Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Sorting input files into multiple files using ranges

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
vishal_arora

New User


Joined: 20 May 2005
Posts: 16

PostPosted: Wed Aug 27, 2008 12:44 pm    Post subject: Sorting input files into multiple files using ranges
Reply with quote

Hi All

I have 5 input files with recfm = vb and lrecl=20476
We have to create 38 output files out of these 5 input files based on the conditions specified

NIC " A999999999"
NIC " B999999999"
NIC " E999999999"
NIC " F999999999"
NIC " GB09999999
NIC " GB19999999
NIC " GB39999999
NIC " GB99999999"
NIC " G999999999"
NIC " P999999999"
NIC " RP19999999
NIC " RP29999999
NIC " RP39999999
NIC " RP99999999
NIC " R999999999"
NIC " S999999999"
NIC " TL99999999"
NIC " TM09999999
NIC " TM29999999
NIC " TM99999999
NIC " TR09999999
NIC " TR19999999
NIC " TR29999999
NIC " TR99999999
NIC " T999999999
NIC " Z999999999
NIC " 0K43999999"
NIC " 0K46999999"
NIC " 0K99999999"
NIC " 0999999999"
NIC " 9999999999"
CLI " L999999999"
CLI " M099999999"
CLI " M999999999"
CLI " ZZ99999999"
CLI " 9999999999"

The first three characters are the company code and the rest is the master key and we need to create 38 files using this condition as follows :

For ex :

1) For company code NIC all the master key starting from A and rest all will go to one file
2) For company code NIC all the master key starting from B and rest all will go to one file
3) similarly for E
4) similarly for F
5) similarly for GB0
6) Here for company code nic and master key starting from GB1 to GB2 range
7) Here for company code nic and master key starting from GB3 only
8) Here for company code nic and master key starting from GB4 onwards to to GB99999999 range

Similarly the pattern follows

In input file the company code starts at position 5 and Master key starts at positon 13 since the file is vb.

Hope i am clear need help on this
Back to top
View user's profile Send private message

Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Wed Aug 27, 2008 11:08 pm    Post subject:
Reply with quote

Quote:
Hope i am clear


Unfortunately, you're not.

If you want to create multiple output files based on different conditions, the basic DFSORT syntax would be:

Code:

     OPTION COPY
     OUTFIL FNAMES=OUT1,INCLUDE=(condition1)
     OUTFIL FNAMES=OUT2,INCLUDE=(condition2)
     ...


However, in order to help you fill in the conditions, I'd have to understand the "rules" you want to use and they aren't clear. So if you need more help, I need to know the following and see a good example of input and expected output.

Are the records you show from the input file, or one of the output files, or what?

Quote:
In input file the company code starts at position 5 and Master key starts at positon 13 since the file is vb.


A VB file has an RDW in positions 1-4, so the first data byte starts at position 5, not position 1. Did you count the RDW when you gave the positions, or does the company code really start at position 9 (5+4) and the Master key really start at position 17 (13+4)?

Quote:
1) For company code NIC all the master key starting from A and rest all will go to one file


Do you mean that all input records that have 'NIC' in positions 9-11 and 'A' in position 17 go to one output file, or do you mean something else? If something else, state the "rules" more clearly.

Quote:
Here for company code nic and master key starting from GB1 to GB2 range


Do you mean that all input records that have 'NIC' in positions 9-11 and 'GB1', 'GB2' or 'GB3' in positions 17-19 go to one output file, or do you mean something else? If something else, state the "rules" more clearly.

It would really help if you would show an example of the records in the input file and the corresponding records you expect in the various output files.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Unable to catalog a gdg dataset resid... Shovan JCL & VSAM 7 Fri Mar 24, 2017 2:24 pm
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts To display values of multiple rows in... vinu78 DB2 2 Thu Mar 09, 2017 1:20 pm
No new posts Formating the Input file sreekusr DFSORT/ICETOOL 3 Fri Feb 17, 2017 10:40 pm
No new posts Submit job from Cobol with input data abdulrafi COBOL Programming 4 Wed Feb 01, 2017 12:41 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us