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
To read two digits from data area we co as below
TESTDTA data area value is ABCDEFGHIJKL
Program:
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
how can database records be read without lock ?
Why we have multiple data types in As400 and why we use numeric, packed, decimal, zoned the basic difference between this?
when is a tag statement used in rpg?
how do you specify the number of records to roll in a subfile ?
http default port 80 is used by some other production http service. How can I create an http instance on another port to run cgidev2 and my future cgi developments?
What is array in as400? What are the types of array?
hi guys i am new for sqlrpgle, please suggest me good websites and theory and coding. plz plz its very urgent.
define the purpose of the leave operation?
which single rpg opcode performs both setll and reade?
how you get the relative record in a subfile in which cursor is located?
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...
is there any way to dynamically merge other html scripts into a given html?
What Is The Error If We Don't Get Login Screen?
what is the use of data structures?
how can you execute a command from within an rpg program without calling a clp program?