Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts BUILD OUTFIL based on condition other... balaji81_k DFSORT/ICETOOL 13 Fri Sep 08, 2017 11:06 pm
No new posts Question related to Data dictionary f... rexx77 SYNCSORT 3 Thu Aug 31, 2017 7:23 am
No new posts Skip file from delete pema_yozer All Other Mainframe Topics 3 Tue Aug 29, 2017 3:19 pm
No new posts Extract Data till prev hour balaji81_k DB2 16 Fri Aug 25, 2017 9:25 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us