Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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. |
|