How to read 2 positions at a time in a data area? I have
created a data area of length and i have to read the values
of the data area like 91-92,93-94 at a time up till 100
Answer Posted / chandrababu
Please see below code
Ex TESTDTA value: ABCDEFGHIJKL
0001.00 PGM
0002.00 DCL VAR(&AB) TYPE(*CHAR) LEN(2)
0002.01 DCL VAR(&I) TYPE(*DEC) LEN(2) VALUE(1)
0003.00 READ: IF COND(&I *LE 24) THEN(DO)
0004.00 RTVDTAARA DTAARA(DURGA4001/TESTDTA (&I 2)) RTNVAR(&AB)
0004.01 CHGVAR VAR(&I) VALUE(&I +2)
0004.02 IF COND(&AB *NE ' ') THEN(DO)
0004.03 SNDUSRMSG MSG(&AB)
0004.04 ENDDO
0004.05 ELSE CMD(GOTO CMDLBL(END))
0006.00 GOTO READ
0007.00 ENDDO
0008.00 END:
0009.00 ENDPGM
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
can we use ASCII ,CDUP,SENDPASV commands in SFTP?
what is the sequence when using cursor?
How to add 99 menu (page down) option in menu creation..
what is the function of cpysplf command?
What is %CHECK?
how can I control the way a remote browser uses its cache?
what is the difference between normal upddta to pf and updating using dfu program?
what is the use of sflend keyword?
which type of object is used in db2/400?
what are the two record formats a subfile contain ?
What is file access opcodes?
how will you search an array?
How to reverse the string in rpg
how do you use exceptional write in c specs?
what is the difference between sflclr and sflinz?