View previous topic :: View next topic
|
Author |
Message |
ESSPRABHU
New User
Joined: 11 Oct 2005 Posts: 22
|
|
|
|
HI,
The input file is having header and trailer and we need to sort it by using a single JCL step. The output file should contain the header and trailer records. How can we do it in SYNCSORT or FILEAID batch?
No ICETOOL please...... |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
I'm not aware of any sort capabilty in FILEAID.
Gerry |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
ESSPRABHU,
Quote: |
How can we do it in SYNCSORT or FILEAID batch? |
Difficult to answer with the inputs you have provided.
Please post some sample records, input/output file attributes and record identifiers(e.g., HEADER in pos 1 to 6 for header record)
Thanks,
Arun |
|
Back to top |
|
|
ESSPRABHU
New User
Joined: 11 Oct 2005 Posts: 22
|
|
|
|
Hi,
Input and outfiles will be FB only.
Take any LRECL for the files, I need just the example coding.
Input file:
header1
1235242
7665575
466757
5465757
Trailer1
Output file should be
Header1
1235242
466757
5465757
7665575
Trailer1 |
|
Back to top |
|
|
ESSPRABHU
New User
Joined: 11 Oct 2005 Posts: 22
|
|
|
|
We are using SYNCSORT, that's please provide the solution in SYNCSORT. |
|
Back to top |
|
|
ESSPRABHU
New User
Joined: 11 Oct 2005 Posts: 22
|
|
|
|
Thanks Aaru.....
I used the below code in SYNCSORT and it's working fine.
INREC IFTHEN=(WHEN=INIT,OVERLAY=(172:C'1')),
IFTHEN=(WHEN=(32,2,BI,EQ,X'0000'),OVERLAY=(172:C'0')),
IFTHEN=(WHEN=(32,2,BI,EQ,X'FFFF'),OVERLAY=(172:C'9'))
SORT FIELDS=(172,1,CH,A,9,7,CH,A,39,3,CH,A)
OUTREC FIELDS=(1,171)
Thanks,
Prabhu. |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
Prabhu,
You are Welcome.
Quote: |
I used the below code in SYNCSORT and it's working fine.
|
Thats great.
Quote: |
IFTHEN=(WHEN=(32,2,BI,EQ,X'0000'),OVERLAY=(172:C'0')),
IFTHEN=(WHEN=(32,2,BI,EQ,X'FFFF'),OVERLAY=(172:C'9')) |
As per the code it looks like you are differentiating the header and trailer by the data in the 32nd position. But your sample input in the previous post looks different. |
|
Back to top |
|
|
|