Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

what is logical file?

1090


how do you use exceptional write in c specs?

1991


how to pick up the changed records every time in a subfile after the first change made ?

1892


how does union file maintains record formats?

1167


what are the two record formats a subfile contain ?

2012


what is the sequence when using cursor?

1276


Can you summarize the steps I have to go through in writing my first cgi?

1164


how many types of display are available on as/400 for user interaction?

1161


how you get the relative record in a subfile in which cursor is located?

1161


what is the use of data structures?

1184


what is a composite key?

1756


Pose, there are 100 records in the file.i need to retrieve all the records matching/equal to the particular name field. How can we do the above using search criteria other than using the if cond?

1094


what is elastic and non elastic subrile?

1049


Difference Between Interactive & Batch Job?

1300


which of the following operations does not zero the field flda defined as 4,0?

1238