View previous topic :: View next topic
|
Author |
Message |
Gay251319
New User
Joined: 17 Jun 2009 Posts: 57 Location: Kochi
|
|
|
|
I have the input
JCIC-INQ-BARE-V01-A8250580980624
3763111111111NA100002
3763111111112NA200002
3763111111113NA300002
TRLR000001209806241515
I want the ouput
JCIC-INQ-BARE-V01-A8250580980624
NA100002
NA300002
NA400002
TRLR000001209806241515 |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
And the question is ? |
|
Back to top |
|
|
Gay251319
New User
Joined: 17 Jun 2009 Posts: 57 Location: Kochi
|
|
|
|
Hi , sorry
I am in need of the above output .. without using ICETOOL ..
Even if we use 2 steps in a single jcl its ok |
|
Back to top |
|
|
Gay251319
New User
Joined: 17 Jun 2009 Posts: 57 Location: Kochi
|
|
|
|
Hi ,
Can anyone help me
Whether it is possible ? |
|
Back to top |
|
|
acevedo
Active User
Joined: 11 May 2005 Posts: 344 Location: Spain
|
|
|
|
I would use IFTHEN...something like:
Code: |
OUTFIL IFTHEN=(WHEN=(1,2,CH,EQ,C'??'),
BUILD=(14,08)),
IFTHEN=(WHEN=(1,2,CH,NE,C'??'),
BUILD=(1,80)) |
|
|
Back to top |
|
|
Gay251319
New User
Joined: 17 Jun 2009 Posts: 57 Location: Kochi
|
|
|
|
Hi ,
I used the same like
SORT FIELDS=COPY
OUTFIL IFTHEN=(WHEN=(1,4,CH,EQ,C'JCIC'),
BUILD=(1:1,80)),
IFTHEN=(WHEN=(1,4,CH,EQ,C'TRLR'),
BUILD=(1:1,80)),
IFTHEN=(WHEN=NONE,
BUILD=(1:14,8,9:67X))
I got the output
Thank you very much for the help |
|
Back to top |
|
|
Gay251319
New User
Joined: 17 Jun 2009 Posts: 57 Location: Kochi
|
|
|
|
Hi ,
But one small thing
Apart from header and trailer if i want to sort the other records
What should I want to do ?
My input is
JCIC-INQ-BARE-V01-A8250580980624
376
111
367
TRLR000001209806241515
ANd i need the output
JCIC-INQ-BARE-V01-A8250580980624
111
367
376
TRLR000001209806241515
Can anyone pls help me |
|
Back to top |
|
|
Gay251319
New User
Joined: 17 Jun 2009 Posts: 57 Location: Kochi
|
|
|
|
The above should be done without using PGM=ICETOOL
Because i am using SYNCSORT sort product |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
Gay251319 wrote: |
Because i am using SYNCSORT sort product |
Is this the reason that you can not use ICETOOL? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
A lot of sites that use SYNCSORT have an alias pointing to the SYNCSORT equivilent - so in fact you would invoke SYNCTOOL and not ICETOOL. |
|
Back to top |
|
|
Gay251319
New User
Joined: 17 Jun 2009 Posts: 57 Location: Kochi
|
|
|
|
Hi ,
Actually i dont want to do in ICETOOL
Whether any other option is there? |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Hello,
This is untested, but you can give it a try. I assumed that you need to sort on first 14 chars for detail records. You can modify it as per your requirement.
Code: |
//SYSIN DD *
INREC IFTHEN=(WHEN=(1,4,CH,EQ,C'JCIC'),
OVERLAY=(81:C'0')),
IFTHEN=(WHEN=(1,4,CH,EQ,C'TRLR'),
OVERLAY=(81:C'2')),
IFTHEN=(WHEN=NONE,
OVERLAY=(1:14,8,80:X,81:C'1'))
SORT FIELDS=(81,1,CH,A,1,14,CH,A)
OUTFIL BUILD=(1,80) |
|
|
Back to top |
|
|
Gay251319
New User
Joined: 17 Jun 2009 Posts: 57 Location: Kochi
|
|
|
|
Hi Arun ,
Thanks A lot
I got the output
Sorry for the delay |
|
Back to top |
|
|
|