MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Select records depending on condition

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
chandra
Beginner


Joined: 26 Sep 2003
Posts: 130
Topics: 36

PostPosted: Mon Dec 22, 2008 7:15 pm    Post subject: Select records depending on condition Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Tue Dec 23, 2008 11:51 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
chandra
Beginner


Joined: 26 Sep 2003
Posts: 130
Topics: 36

PostPosted: Tue Dec 23, 2008 2:45 pm    Post subject: Reply with quote

Thank you Kolusu...Your solution is working. I don't need the output in original order. Thaks once again
_________________
Regards,
Chandra
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group