|
View previous topic :: View next topic
|
| Author |
Message |
jithumohan
New User
Joined: 31 Jan 2008 Posts: 30 Location: Woodland Hills, CA
|
|
|
|
Hi,
I need to check following condition on each record in a mainframe flat file and write only records which satisfies this condition. Can anyone let me know the sort card for achieving this?
Date1 (in CCYY-MM-DD format) - system date (in CCYY-MM-DD format) <= field2 (days). |
|
| Back to top |
|
 |
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
| jithumohan wrote: |
Hi,
I need to check following condition on each record in a mainframe flat file and write only records which satisfies this condition. Can anyone let me know the sort card for achieving this?
Date1 (in CCYY-MM-DD format) - system date (in CCYY-MM-DD format) <= field2 (days). |
1. What is the LRECL and RECFM of the input file?
2. What is the Position of the Date field?
3. What is the position and format of Filed2 which has the days?
4. Last but not least run the following job and show me the complete sysout which helps us determine the level of DFSORT you have.
| Code: |
//STEP0100 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
//* |
|
|
| Back to top |
|
 |
jithumohan
New User
Joined: 31 Jan 2008 Posts: 30 Location: Woodland Hills, CA
|
|
|
|
Here is the sort card I am using.
SORT FIELDS=COPY
INREC IFOUTLEN=450,IFTHEN=(WHEN=INIT,
OVERLAY=(451:DATE1,360,10,UFF,M10,LENGTH=8,
467:459,8,Y4T,DATEDIFF,451,8,Y4T))
OUTFIL INCLUDE=(467,3,ZD,LE,369,3,ZD)
450 is the record length, RECFM=FB.
Date1 is at position 360
field2 is at position 369
But I am getting syntax error in 467:459,8,Y4T,DATEDIFF,451,8,Y4T)) |
|
| Back to top |
|
 |
Anuj Dhawan
Superior Member

Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
| Quote: |
| But I am getting syntax error in 467:459,8,Y4T,DATEDIFF,451,8,Y4T)) |
You also need to execute the code Skolusu show, please do so and post the SYSOUT here. |
|
| Back to top |
|
 |
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
| jithumohan wrote: |
| But I am getting syntax error in 467:459,8,Y4T,DATEDIFF,451,8,Y4T)) |
Well I am guessing that you are using syncsort, which does not support Y4T, so if you indeed using syncsort then please post your questions in the JCL forum. |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|