Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
Reading multiple records in ESDS

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
Author Message
brahmanandareddy

New User


Joined: 16 Dec 2004
Posts: 48
Location: Hyderabad

PostPosted: Tue Mar 08, 2005 2:13 pm    Post subject: Reading multiple records in ESDS
Reply with quote

Hi everybody,

I have an ESDS file consisting of 10 records. I want to read them one by one using a map. Can u write the code (not entire, but showing how to read multiple times) how to read all the 10 records and elaborate how does CICS raise the end-of-file condition?

Thanking You,
Bramhananda Reddy. K.
Back to top
View user's profile Send private message
References
ragin

New User


Joined: 20 Feb 2005
Posts: 16

PostPosted: Thu Mar 10, 2005 9:47 am    Post subject: Re: Reading multiple records in ESDS
Reply with quote

HEY DUDE,
Here goes ur prog TO DISPLAY ALL RECORDS WITH TIME DELAY:
ID Division
PROGRAM-ID.
ENVIRONMENT Division
Data Division
Working Storge Section.
77 WS-RESP PIC S9(4)COMP.
77 WS-RKEY PIC S9(8)COMP.
01 WS-OUT
05 OUT-ID PIC X(4).
05 PIC X.
05 OUT-NAME PIC X(10).
05 PIC X(65).
01 WS-AREA.
05 WS-ID PIC X(4).
05 PIC X.
05 WS-NAME PIC X(10).
05 PIC X(65).
PROCEDURE DIVISION.
MAIN-PARA.
MOVE LOW-VALUES TO WS-AREA.
MOVE 80 TO WS-RKEY.
PERFORM 100-MOVE-PARA.
PERFORM 200-READ-NEXT-PARA.
100-MOVE-PARA.
EXEC CICS STARTBR
FILE('FILE NAME')
RIDFLD(WS-RKEY)
RBA
END-EXEC.
200-READ-NEXT-PARA.
EXEC CICS READNEXT
FILE('FILE NAME')
INTO(WS-AREA)
RIDFLD(WS-RKEY)
RBA
RESP(WS-RESP)
END-EXEC.
IF-(WS-RESP = DFHRESP(NORMAL))
MOVE WS-AREA TO WS-OUT
EXEC CICS SEND
FROM(WS-OUT)
ERASE
END-EXEC
EXEC CICS DELAY
INTERVAL(000002)
END-EXEC
GO TO 200-READ-NEXT-PARA
ESLE
GO TO RETURN-PARA
END-IF.
RETURN-PARA.
EXEC CICS RETURN
END-EXEC.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS All times are GMT + 6 Hours
Page 1 of 1