Hi i have started learning Subfile and i've written a Load All Subfile code to display all the records in a PF.
it is working fine.But I want to know what else should i include in this code to make it accoring to coding standard.
Also i need help in writing the single page Subfile program.So what things should i include in this code to make it work as Single Page Subfile.
Here is the code >>
FVb001sflpfIF E k Disk
FVb001sfl CF E Workstn SFILE(VB1SFL:@RRN)
D@Rrn S 3 0
***----------------------------------------------------->>
C Exsr SflCLr
C Exsr SflDsplay
C Eval *inlr = '1'
***-----------------For Sfl Clear ---------------------->>
C SflCLr BegSr
C Eval *in50= '0'
C EndSr
***-----------------For Sfl Display--------------------->>
C SflDsplay BegSr
C ' ' SETLL Vb001sflpf
C WRITE VB1CTL
C WRITE VB1BTM
C Eval *in50 = '1'
C EVAL @RRN = 0
C Read Vb001sflpf
C DOW Not%EOF(Vb001sflpf)
C MOVE PFITEMID SFLITEMID
C MOVE PFAMT SFLAMT
C MOVE PFDESC SFLDESC
C EVAL @RRN = @RRN + 1
C Write VB1SFL
C Read Vb001sflpf
C ENDDO
C DOW *IN03 = '0'
C Exfmt VB1CTL
C ENDDO
C EndSr
Thanks :)
Software/Hardware used:
AS400,RPGLE
ASKED:
July 27, 2012 12:19 PM
UPDATED:
July 27, 2012 12:19 PM
Coding standards vary from company to company. Without knowing what those standards are it is not possible for anyone here to judge whether your code meets those standards or no. For a ‘Single Page Subfile’ you will need to develop code that handles the loading of the specific subset of data you wish to present. There are numerous examples accessible through a quick search of the internet.To borrow a phrase from TomLiotta, what is the specific technical problem you’re having?
Apparently this editor has an odd and inconsistent view of paragraphs.
For the load all, I would have a seperate subroutine for loadSFL and dspsfl.
I would say the for about $4.00 used plus $50 handling and Shipping you should get the book Essentials of Subfile Programming and Advanced Topics in RPGIV.
If you think you have questions now..wait till you try to read the book!