IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Reading multiple records in ESDS


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
brahmanandareddy

New User


Joined: 16 Dec 2004
Posts: 44
Location: Hyderabad

PostPosted: Tue Mar 08, 2005 2:13 pm
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
ragin

New User


Joined: 20 Feb 2005
Posts: 16

PostPosted: Thu Mar 10, 2005 9:47 am
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
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CICS

 


Similar Topics
Topic Forum Replies
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Multiple table unload using INZUTILB DB2 2
Search our Forums:

Back to Top