View previous topic :: View next topic |
Author |
Message |
psmadhusudhan Beginner

Joined: 28 Nov 2006 Posts: 143 Topics: 48
|
Posted: Mon Jun 21, 2021 4:10 am Post subject: Unstring using SORT or any other utility |
|
|
Hi All,
I would like to know whether we can do unstring using SORT or any other utility.
My requirement is as below
Input file is have pipe delimited data as below
Code: | BARTHOLOMEW|XXXX|UNK|UNK|1959-08-31|000000000|BARTHOLOMEW|XXXX|UNK|UNK|2999-12-31
|
Expected Output as below
Code: | BARTHOLOMEW |XXXX |UNK|UNK|1959-08-31|000000000|BARTHOLOMEW |XXXX |UNK|UNK|2999-12-31 |
Below are output field length as a sample
field1 - 20 bytes
field2 - 20 bytes
field3 - 3 bytes
field4 - 3 bytes
field5 - 10 bytes
field6 - 10 bytes
field7 - 20 bytes
field8 - 20 bytes
field9 - 3 bytes
field10 - 3 bytes
field11 - 10 bytes
Please advise if this can be done through sort or any other utility or I have to opt for Cobol program only.
If possible please help with possible jcl code. Even if delimiter '|' is removed also no issue. _________________ Thanks
Madhu Sudhan |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
|
Back to top |
|
 |
psmadhusudhan Beginner

Joined: 28 Nov 2006 Posts: 143 Topics: 48
|
Posted: Mon Jun 21, 2021 11:39 am Post subject: |
|
|
Sorry kolusu. My apologies. I couldn't recall the key word PARSE and ended up posting the question. It had been 10 years since my previous question so forgot about it completely. thanks for being kind and replying. _________________ Thanks
Madhu Sudhan |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Mon Jun 21, 2021 1:59 pm Post subject: |
|
|
psmadhusudhan wrote: | Sorry kolusu. My apologies. I couldn't recall the key word PARSE and ended up posting the question. It had been 10 years since my previous question so forgot about it completely. thanks for being kind and replying. |
psmadhusudhan,
Just an fyi.. If you had searched for unstring which is the part of the title of this topic in the utilities forum you would have found your own topic.
Either way please search before posting and once you coded the solution you can share it with us. _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
|
|