View previous topic :: View next topic |
Author |
Message |
chandra Beginner
Joined: 26 Sep 2003 Posts: 130 Topics: 36
|
Posted: Mon Dec 22, 2008 7:15 pm Post subject: Select records depending on condition |
|
|
Hi All,
I have following problem.
the field postions are as follows
Filler = Positon 1,length=5
Contract NBR = Positon 6,length=15
Filler = Positon 21,length=5
Address type = Positon 26,length=5 (RESID is resedent address, "MAIL " is mailing address type)
State code = Positon 31,length=2
Filler = Positon 33,length=5
If any contract number have a resident address type then mailing address needs to ignore and select the resident address type (without duplicates). If there is no resident address type then we need to select mailing address type record for that contract (without duplicates). The input file LRECL=37, RECFM=FB output file will be same.
Input file
[code:1:034ac321f2]
----+----1----+----2----+----3----+--
... _________________ Regards,
Chandra |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Tue Dec 23, 2008 11:51 am Post subject: |
|
|
chandra,
The following DFSORT/ICETOOL JCL will give you the desired results. The output is sorted on the ascending sequence of the Contract NBR.
Let me know if you want to retain the original order of the input
[code:1:bef1e61087]
//STEP0100 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD *
... _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
chandra Beginner
Joined: 26 Sep 2003 Posts: 130 Topics: 36
|
Posted: Tue Dec 23, 2008 2:45 pm Post subject: |
|
|
Thank you Kolusu...Your solution is working. I don't need the output in original order. Thaks once again _________________ Regards,
Chandra |
|
Back to top |
|
 |
|
|