View previous topic :: View next topic
|
Author |
Message |
itjagadesh
New User
Joined: 05 Dec 2006 Posts: 89 Location: chennai
|
|
|
|
Hi All,
I Need a requirement like below
Input PS File1 RECFM = 80 contains one record(Timestamp)
Input PS File2 RECFM = 80 (Customer and timestamp)
Code: |
100 2005
101 2006
102 2007
103 2008
104 2009
105 2010
108 2011
|
File1 contains Time stamp and File2 Contains Customer ,Timestamp
Output PS File3 RECFM = 80 should contains timestamp greater than or equal to 2008..like below.. (Key as first file)
Code: |
103 2008
104 2009
105 2010
108 2011
|
Please help me to sort out this
Regards
Jagadesh |
|
Back to top |
|
|
itjagadesh
New User
Joined: 05 Dec 2006 Posts: 89 Location: chennai
|
|
|
|
In the above requirement ,
PS File1 - Data may vary dynamically (Timestamp will vary)
For Example I given as 2008.
Regards
Jagadesh |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Here's a DFSORT job that will do what you asked for:
Code: |
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file1 - timestamp (FB/80)
//SORTOUT DD DSN=&&S1,UNIT=SYSDA,SPACE=(TRK,(1,1)),DISP=(,PASS)
//SYSIN DD *
OPTION COPY
* Create DFSORT symbol as:
* TDATE,+yyyy
INREC BUILD=(C'TDATE,+',1,4,80:X)
/*
//S2 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SYMNAMES DD DSN=&&S1,DISP=(OLD,PASS)
//SORTIN DD *
//SORTIN DD DSN=... input file2 - customer/timestamp (FB/80)
//SORTOUT DD DSN=... output file - customer/timestamp (FB/80)
//SYSIN DD *
OPTION COPY
* Use TDATE in INCLUDE
INCLUDE COND=(7,4,ZD,GE,TDATE)
/*
|
|
|
Back to top |
|
|
itjagadesh
New User
Joined: 05 Dec 2006 Posts: 89 Location: chennai
|
|
|
|
Thanks a lot Frank,
Its working fine.
Thanks
Jagadesh |
|
Back to top |
|
|
Ajay Baghel
Active User
Joined: 25 Apr 2007 Posts: 206 Location: Bangalore
|
|
|
|
Good example on how to create SYMNAMES dataset.
Thanks Franks. |
|
Back to top |
|
|
|