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
What is binder language ?
The content of Physical file is as below: hfcftp wruquief SENDPASV 0 CDUP ASCII GET 01100901.CSV ramndk/ECP505.EC0110090 (REPLACE QUIT Thw above commands will get executed when we call STRTCPFTP from CL program.... Now if I want to use SFTP what can be the solution? plz reply in detail....Thank you for ny help... I m using RPG/ILERPG to download...
how do handle file exception/error?
when are the referential constraints executed?
which of the cl command can be used to determine which logical files are dependent on a specific file?
when is a tag statement used in rpg?
1. There is a file called Month. Month has 12 members called Jan, Feb, ..., Dec. How to design a rpg code which can access any member and show its content. (User can ask for any member when required)?
different type of cursor?
Write a logic program for knowing the repeated number of a vowels in a given program?
what is rpg ?
describe the difference between the dowxx and douxx operations?
what is the purpose of putovr (put with explicit override) keyword?
what is the purpose of ovrdta and ovrata keywords ?
How can we read file using curser? how to define a curser?
what are the different types of arrays available in rpg ?