View previous topic :: View next topic
|
Author |
Message |
brahmanandareddy
New User
Joined: 16 Dec 2004 Posts: 44 Location: Hyderabad
|
|
|
|
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 |
|
|
ragin
New User
Joined: 20 Feb 2005 Posts: 16
|
|
|
|
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 |
|
|
|