how to use rcdnbr in program (rpgle)? and what is the purpose for rcdnbr?
Announcement
Collapse
No announcement yet.
rpgle
Collapse
X
-
Re: rpgle
First, Define the keyword of RECNO in F Specification , then, you can use
for example
Code:FTESTPF IF E DISK RECNO(RRNO) ����. DRRNO 9P 0 INZ(0) ����. C *ENTRY Plist C Parm BEGNO 10 0 C Parm ENDNO 10 0 ����. C BEGNO SETLL TESTPF C DOW 1=1 C READ TESTPF 31 C *IN31 IFEQ '1' C LEAVE C ENDIF ����� C IF RRNO > ENDNO C LEAVE C ENDIF ����� C ENDDO �����.Blog Liou
The iSeries is such a good machine that it doesnâ??t sell services, the IBM insider believes.
Plus, most of the IBM software youâ??d want or need already comes packaged with the box.
If IBM really marketed it, everyone would buy it. ... But then IBM wouldnâ??t sell services, software, and reliability/backup.
As it is, the customer is the best marketing the platform has.
-
Re: rpgle
its used to return to the program the current RRN (relative record number) that is being read by the program.
Some physical files are not keyed so the only unique key to them is the RRN
some other uses for rcdnbr
Code:DSPRCDLCK FILE(MASTER/PAYROLL) MBR(*FIRST) RCDNBR(1) OUTPUT(*) This command shows the lock status of relative record number 1, in the first member of the physical file named PAYROLL in the MASTER library. CMPJRNIMG FILE(MYLIB/PAYROLL) MBR(APRIL) RCVRNG((RCVLIB/RCV3) (*CURRENT)) FROMENT(200) TOENT(500) CMPOPT(*AFTER) RCDNBR(999) OUTFMT(*HEX) This command compares the journaled record-level changes for the member named APRIL in file PAYROLL in MYLIB, beginning with receiver RCV3 in RCVLIB and ending with the journal receiver that is currently attached at the start of the comparison. The range of entries compared starts with entry 200 and ends with entry 500. Only the after-images and previous after-images are compared. The comparison is limited to record number 999. The output is printed in hexadecimal format.
All my answers were extracted from the "Big Dummy's Guide to the As400"
and I take no responsibility for any of them.
www.code400.com
Comment
-
Re: rpgle
Yes, other example,
you can use CPYF to copy Record data, while specifying the range with RCDNUM
CPYF FROMFILE(TEST1) TOFILE(TEST2) FROMRCD(100) TORCD(200)Blog Liou
The iSeries is such a good machine that it doesnâ??t sell services, the IBM insider believes.
Plus, most of the IBM software youâ??d want or need already comes packaged with the box.
If IBM really marketed it, everyone would buy it. ... But then IBM wouldnâ??t sell services, software, and reliability/backup.
As it is, the customer is the best marketing the platform has.
Comment



Comment