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

Syncsort - Changing blank characters to LOWVALUES


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
mallik4u

New User


Joined: 17 Sep 2008
Posts: 75
Location: bangalore

PostPosted: Fri Jan 14, 2011 1:03 pm
Reply with quote

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
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Fri Jan 14, 2011 11:01 pm
Reply with quote

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
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 496
Location: USA

PostPosted: Tue Jan 18, 2011 9:49 pm
Reply with quote

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
View user's profile Send private message
mallik4u

New User


Joined: 17 Sep 2008
Posts: 75
Location: bangalore

PostPosted: Wed Jan 19, 2011 10:42 am
Reply with quote

Thank you very much.
That solved my problem.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Wed Jan 19, 2011 11:36 am
Reply with quote

Mallik,

You're welcome. Thanks for letting us know
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 Compare only first records of the fil... SYNCSORT 7
No new posts Substring number between 2 characters... DFSORT/ICETOOL 2
No new posts changing defaults in db2 admin - Unlo... DB2 0
No new posts Reading dataset in Python - New Line ... All Other Mainframe Topics 22
No new posts Merge files with a key and insert a b... DFSORT/ICETOOL 6
Search our Forums:

Back to Top