View previous topic :: View next topic
|
Author |
Message |
mallik4u
New User
Joined: 17 Sep 2008 Posts: 75 Location: bangalore
|
|
|
|
Hi,
I have a file. Which has blank lines (entire record is having SPACE chars). I have to replace the blank chars with LOWVALUES only for the blank record. Spaces present at the end of the other records should not get changed. We have Syncsort in our shop.
I tried the following but couldn't able to achieve the results. Any lead in this regard will be a great help.
SORT FIELDS=COPY
OUTREC IFTHEN=(WHEN=(1,160,CH,EQ,X'40'),
OVERLAY=(1:X'00'))
Job is giving return code as 00 but nothing is getting converted.
SORT FIELDS=COPY
ALTSEQ CODE=(4000)
OUTREC FIELDS=(1,160,TRAN=ALTSEQ)
Job is converting all the SPACES in the file to LOW-VALUES.
Record length is 160.
Example data:
Input:
12321 34
23434234
34 43456
If we open the file in HEX ON then we can see spaces(x'40') in second chars
Output:
12321 34
23434234
34 43456
Only second record in the file should have LOW-VALUES (X'00').
Space in 1st and 4th record should not get converted. |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
mallik4u,
This is untested, but I believe modifying your sort card like this should solve your problem.
Code: |
SORT FIELDS=COPY
OUTREC IFTHEN=(WHEN=(1,160,CH,EQ,C' '),
OVERLAY=(1:160Z)) |
|
|
Back to top |
|
|
Alissa Margulies
SYNCSORT Support
Joined: 25 Jul 2007 Posts: 496 Location: USA
|
|
|
|
Arun Raj wrote: |
This is untested, but I believe modifying your sort card like this should solve your problem. |
Yes, your solution will work. |
|
Back to top |
|
|
mallik4u
New User
Joined: 17 Sep 2008 Posts: 75 Location: bangalore
|
|
|
|
Thank you very much.
That solved my problem. |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Mallik,
You're welcome. Thanks for letting us know |
|
Back to top |
|
|
|