View previous topic :: View next topic |
Author |
Message |
indrjn Beginner
Joined: 17 May 2010 Posts: 2 Topics: 1
|
Posted: Thu May 20, 2010 6:45 pm Post subject: concatenation in Easytrieve program |
|
|
Hi!
i am new could you help me how to do in easytrive program
example: Code: |
//QSAM0080 DD DSN=SIMOTIME.DATA.FILE0001,DISP=SHR
// DD DSN=SIMOTIME.DATA.FILE0002,DISP=SHR
// DD DSN=SIMOTIME.DATA.FILE0003,DISP=SHR
|
the Easytrive program how readsQSAM0080 and the DD statements will map the three files (FILE0001, FILE0002 and FILE0003) as one file.
How program's initial read will get the first record from FILE0001 and will not get an End-of-File condition until the last record of FILE0003 will be processed
can i use select statement |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12357 Topics: 75 Location: San Jose
|
Posted: Thu May 20, 2010 9:12 pm Post subject: |
|
|
indrjn,
When you concatenate files they are all treated as a single file and in your program you will find file declaration for QSAM0080.
Easytrieve opens and reads the records from file defined on the JOB statement.
Sample
Code: |
FILE QSAM0080
your file layout declaration
FILE OUT0080
your output-file layout declaration
JOB INPUT QSAM0080
IF INP-VAL = 'SOME VALUE'
PUT OUT0080 FROM QSAM0080
END-IF
|
Put statement writes the record
Kolusu |
|
Back to top |
|
|
indrjn Beginner
Joined: 17 May 2010 Posts: 2 Topics: 1
|
Posted: Fri May 21, 2010 5:03 pm Post subject: |
|
|
thanks Kolusu. I will try it and let you know |
|
Back to top |
|
|
|
|