View previous topic :: View next topic
|
Author |
Message |
raz832
New User
Joined: 27 Mar 2007 Posts: 15 Location: Chennai
|
|
|
|
Hi friends,
How can i ue READ NEXT command for VSAM file defined as below.
FD UUUAG-TRANS-RUN-SEQ-FILE
01 UUAG-TRANS-RUN-SEQ-REC PIC X(80).
Ans in the working storage section the record layout is defined as
01 WW-UUAG-TRANS-RUN-SEQ-REC.
03 WW-UUAG-RUN-SEQ-NO PIC 9(009).
03 WW-UUAG-PROCESS-DATE PIC X(007).
03 WW-UUAG-PROCESS-TIME PIC X(006).
03 WW-UUAG-HIGH-TRANS-SEQ-NO PIC 9(009).
03 WW-UUAG-FILE-ID PIC X(004).
03 FILLER PIC X(045).
Can i use READ UUUAG-TRANS-RUN-SEQ-FILE NEXT
One small restriction i should use INTO clause when i use VSAM file.But is NEXT can be combined with INTO statement.
Please clarify... |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
What kind of VSAM file is it?
What does your SELECT statement look like? |
|
Back to top |
|
|
raz832
New User
Joined: 27 Mar 2007 Posts: 15 Location: Chennai
|
|
|
|
Hi william,
Its an KSDS Vsam file..And my select statement looks like:
SELECT UUUAG-TRANS-RUN-SEQ-FILE ASSIGN TO UUUAG
ORGANIZATION IS INDEXED
ACCESS IS DYNAMIC
RECORD KEY IS UUAG-RUN-SEQ-NO
FILE STATUS IS WW-UUAG-STATUS-CODE. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
raz832 wrote: |
Can i use READ UUUAG-TRANS-RUN-SEQ-FILE NEXT
One small restriction i should use INTO clause when i use VSAM file.But is NEXT can be combined with INTO statement. |
Since it is a keyed file, READ NEXT can be used. The INTO can always be used and is not a restriction. |
|
Back to top |
|
|
munikumar Currently Banned New User
Joined: 18 Apr 2007 Posts: 24 Location: India
|
|
|
|
In case of DYNAMIC access method, you can use START command when you know the exact/generic key value of the record. When you know the generic key value you can use READ NEXT command after START.
Regards
Munikumar G |
|
Back to top |
|
|
srini_igsi Currently Banned New User
Joined: 09 Dec 2005 Posts: 30 Location: Pune
|
|
|
|
Will the file status code change as soon as the file pointer switches to a record which has got a key-value other than the one provided during START or only at the end will it change? |
|
Back to top |
|
|
|