View previous topic :: View next topic
|
Author |
Message |
pasu81
New User
Joined: 18 Jun 2005 Posts: 7 Location: india
|
|
|
|
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 |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
pasu81
New User
Joined: 18 Jun 2005 Posts: 7 Location: india
|
|
|
|
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 |
|
|
pasu81
New User
Joined: 18 Jun 2005 Posts: 7 Location: india
|
|
|
|
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 |
|
|
pasu81
New User
Joined: 18 Jun 2005 Posts: 7 Location: india
|
|
|
|
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 |
|
|
pasu81
New User
Joined: 18 Jun 2005 Posts: 7 Location: india
|
|
|
|
While i gave preview and submit i got some java error; so i tried to resubmit 2 times; hence this multiple replies |
|
Back to top |
|
|
pasu81
New User
Joined: 18 Jun 2005 Posts: 7 Location: india
|
|
|
|
While i gave preview and submit i got some java error; so i tried to resubmit 2 times; hence this multiple replies |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
|