MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Unstring using SORT or any other utility

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
psmadhusudhan
Beginner


Joined: 28 Nov 2006
Posts: 143
Topics: 48

PostPosted: Mon Jun 21, 2021 4:10 am    Post subject: Unstring using SORT or any other utility Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Mon Jun 21, 2021 10:38 am    Post subject: Re: Unstring using SORT or any other utility Reply with quote

psmadhusudhan wrote:

If possible please help with possible jcl code. Even if delimiter '|' is removed also no issue.


psmadhusudhan,

You have been a member of this site for almost 15 years and yet you cannot follow simple rule. ie. Search before posting. It is quite amazing that you asked a similar question 10 years ago to "unstring" data and you got an answer to use parse

DFSORT help in unstring name field

Here are other topics(Few of many) you would have found if you simply searched "PARSE" on this board

https://www.mvsforums.com/helpboards/viewtopic.php?t=12467&highlight=parse
https://www.mvsforums.com/helpboards/viewtopic.php?t=12660&highlight=parse
https://www.mvsforums.com/helpboards/viewtopic.php?t=13017&highlight=parse

Please spend time learning rather simply copying and pasting the solutions. Sigh !
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
psmadhusudhan
Beginner


Joined: 28 Nov 2006
Posts: 143
Topics: 48

PostPosted: Mon Jun 21, 2021 11:39 am    Post subject: Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Mon Jun 21, 2021 1:59 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group