Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

help needed in formatting data in a file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
pasu81

New User


Joined: 18 Jun 2005
Posts: 7
Location: india

PostPosted: Sat Jul 23, 2005 4:05 pm    Post subject: help needed in formatting data in a file
Reply with quote

I have data in the input file as
A|B|C|D <= record 1
E||F|G|H <= record 2

I need a output file which has
A B C D <= record 1
E F G H <= record 2


Is there any way to achieve this using any JCL utilities.
Back to top
View user's profile Send private message

Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Sat Jul 23, 2005 8:56 pm    Post subject:
Reply with quote

Do you really have || (two OR signs) between E and F or was that supposed to be | (one OR sign) like for the other fields? It would help if you'd explain more about what you're trying to do. Are you trying to replace one or more OR signs between each field with one blank or are you trying to replace each OR sign with a blank or what? This board removes "extra" blanks unless you use BB code tags, so it's hard to interpret what you actually typed. If you don't know how to use BB code tags, then use b for blank to show what you want.
Back to top
View user's profile Send private message
pasu81

New User


Joined: 18 Jun 2005
Posts: 7
Location: india

PostPosted: Sat Jul 30, 2005 5:00 pm    Post subject: Re: help needed in formatting data in a file
Reply with quote

Hi Frank,

Actually i download the message that comes from a MQ to a flat file which has records as follows

10001|FIELDX1|FIELDY|123456;
10002|FIELD0|B|123456;

The values are delimited by pipe operator, also the length of the value may vary within a predefined length.

I need to format the data as given below

10001bFIELDX1bFIELDYb123456;
10002bFIELD0bbbbbbbbb123456;

Regards,
Pasupathi
Back to top
View user's profile Send private message
pasu81

New User


Joined: 18 Jun 2005
Posts: 7
Location: india

PostPosted: Sat Jul 30, 2005 5:01 pm    Post subject: Re: help needed in formatting data in a file
Reply with quote

Hi Frank,

Actually i download the message that comes from a MQ to a flat file which has records as follows

10001|FIELDX1|FIELDY|123456;
10002|FIELD0|b|123456;

The values are delimited by pipe operator, also the length of the value may vary within a predefined length.

I need to format the data as given below

10001bFIELDX1bFIELDYb123456;
10002bFIELD0bbbbbbbbb123456;

Regards,
Pasupathi
Back to top
View user's profile Send private message
pasu81

New User


Joined: 18 Jun 2005
Posts: 7
Location: india

PostPosted: Sat Jul 30, 2005 5:02 pm    Post subject: Re: help needed in formatting data in a file
Reply with quote

Hi Frank,

Actually i download the message that comes from a MQ to a flat file which has records as follows

10001|FIELDX1|FIELDY|123456;
10002|FIELD0|b|123456;

The values are delimited by pipe operator, also the length of the value may vary within a predefined length.

I need to format the data as given below

10001bFIELDX1bFIELDYb123456;
10002bFIELD0bbbbbbbbb123456;

Regards,
Pasupathi
Back to top
View user's profile Send private message
pasu81

New User


Joined: 18 Jun 2005
Posts: 7
Location: india

PostPosted: Sat Jul 30, 2005 5:15 pm    Post subject:
Reply with quote

While i gave preview and submit i got some java error; so i tried to resubmit 2 times; hence this multiple replies icon_neutral.gif
Back to top
View user's profile Send private message
pasu81

New User


Joined: 18 Jun 2005
Posts: 7
Location: india

PostPosted: Sat Jul 30, 2005 5:16 pm    Post subject:
Reply with quote

While i gave preview and submit i got some java error; so i tried to resubmit 2 times; hence this multiple replies icon_neutral.gif
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Sat Jul 30, 2005 9:28 pm    Post subject:
Reply with quote

For the first record, it looks like you're just trying to replace each '|' with a blank. DFSORT can do that with.

For the second record, it looks like you're trying to replace one blank with multiple blanks (|b| -> bbbbbbbbb). You need to explain the "rule" for that and anything else you want to do other than replacing each '|' with a blank.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
This topic is locked: you cannot edit posts or make replies. SORT trick needed bshkris SYNCSORT 6 Tue May 02, 2017 4:35 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us