View previous topic :: View next topic
|
Author |
Message |
ap_mainframes
Active User
Joined: 29 Dec 2005 Posts: 181 Location: Canada
|
|
|
|
Hello,
I have have got a input file which looks like below :
Code: |
----+----1----+----2----+----3----+----4----+----5
|STEVE |A4A 1A4 --> A
4.1 |STEVE |A4A 1A4
4.1 |STEVE |A4A 1A4
4.1 |STEVE |A4A 1A4
4.1 |STEVE |A4A 1A4
4.1 |STEVE |A4A 1A4
4.1 |STEVE |A4A 1A4
4.1 |STEVE |A4A 1A4
4.1 |STEVE |A4A 1A4
4.1 |STEVE |A4A 1A4
4.1 |STEVE |A4A 1A4
|STEVE |A0A 1A0 --> B |
Please note the records A & B in the above layout. What this dipicts is :
All the records between A & B are under record A ( lets call it A's subsets ). '4.1' in column 1 tell me that these are subsets.
However there could no records under A. In that case my input file would look like
Code: |
----+----1----+----2----+----3----+----4----+----5
|STEVE |A4A 1A4 --> A
|STEVE |A0A 1A0 --> B |
The requirement here is, if there is no A's subsets, then I dont want to show A ( I would like to show B though ) in the output file.
Any advises would be appreciated.
Thanks |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
ap_mainframes,
1) Do you have multiple sets of "A" records in input?
2) Can a group header can be identified by a "-->" at pos-40?
3) Your sample data shows the same values at pos-28 thru pos-34 for a group (A and its subset records). Will this be true for all the groups?
4) Which SyncSort version are you using?
Please post some sample data good enough to cover all possible cases, input/output LRECL/RECFM etc. |
|
Back to top |
|
|
ap_mainframes
Active User
Joined: 29 Dec 2005 Posts: 181 Location: Canada
|
|
|
|
Arcvns,
Answeres to your questions :
1. Yes, I do have multiple sets of "A" records.
2. No, I gave "-->" just for the sake of understanding. The only thing that identifies that its a group header is the fact that there is nothing ( like 4.1 ) in column 1.
3. Yes, this'll be true for all records.
4. Unfortunately, I am not sure of that. How can I find it out ? |
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
ap_mainframes,
A more meanful topic would have made it easier for others who are searching topics here. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
4. Unfortunately, I am not sure of that. How can I find it out ? |
Run a sort and the version info will be printed on the informational output. |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
ap_mainframes wrote: |
No, I gave "-->" just for the sake of understanding. The only thing that identifies that its a group header is the fact that there is nothing ( like 4.1 ) in column 1 |
From what you said above, I guess a group header can be identified by a "space" at pos-1. Then how do you differentiate an "A" group from a "B" group?
What about RECFM/LRECL? |
|
Back to top |
|
|
|