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 / puneet7jun
You can achieve the above by a CL Program. I'm writing a
sample program which is reading DATA AREA 'TESTDTA' of
length 6.
PGM
DCL VAR(&A) TYPE(*CHAR) STG(*AUTO) LEN(1)
DCL VAR(&B) TYPE(*CHAR) STG(*AUTO) LEN(1)
DCL VAR(&C) TYPE(*CHAR) STG(*AUTO) LEN(1)
DCL VAR(&D) TYPE(*CHAR) STG(*AUTO) LEN(1)
DCL VAR(&E) TYPE(*CHAR) STG(*AUTO) LEN(1)
DCL VAR(&F) TYPE(*CHAR) STG(*AUTO) LEN(1)
RTVDTAARA DTAARA(ICIWRKPUS/TESTDTA (1 1)) RTNVAR(&A)
RTVDTAARA DTAARA(ICIWRKPUS/TESTDTA (2 1)) RTNVAR(&B)
RTVDTAARA DTAARA(ICIWRKPUS/TESTDTA (3 1)) RTNVAR(&C)
RTVDTAARA DTAARA(ICIWRKPUS/TESTDTA (4 1)) RTNVAR(&D)
RTVDTAARA DTAARA(ICIWRKPUS/TESTDTA (5 1)) RTNVAR(&E)
RTVDTAARA DTAARA(ICIWRKPUS/TESTDTA (6 1)) RTNVAR(&F)
SNDUSRMSG MSG(&A)
SNDUSRMSG MSG(&B)
SNDUSRMSG MSG(&C)
SNDUSRMSG MSG(&D)
SNDUSRMSG MSG(&E)
SNDUSRMSG MSG(&F)
ENDPGM
Is This Answer Correct ? | 3 Yes | 3 No |
Post New Answer View All Answers
how can a cgi check whether an ifs object is available?
define what a data queue is along with a brief example of what it may be used for?
Why we sometimes use same file name in file and tofile in ovrdbf and sometimes different?
What is compiler directive in as400? Give example of compiler directive.?
what is the use of dspatr(mdt) keyword?
How Many Specs Are There In Rpg & Which Are They?
what would be the effect on the field where reverse image, underline and highlight display attributes are active ?
difference between sflrcdnbr and sflnxtchg?
define a output queue?
how many files can be defined in f specs?
what are different types of substems?
what does dfu program you to do on a record?
what is the clp command to access a query/400?
what is the function of cpysplf command?
writing an sql statement from selecting records from two files using single statement and nested select statement.