IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

help needed in formatting data in a file


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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 Developer


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

PostPosted: Sat Jul 23, 2005 8:56 pm
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
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
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
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
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
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 Developer


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

PostPosted: Sat Jul 30, 2005 9:28 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts How to save SYSLOG as text data via P... All Other Mainframe Topics 2
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Store the data for fixed length COBOL Programming 1
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
Search our Forums:

Back to Top