Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Syncsort to replace spaces with CCYYMMDD

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
kkxlnc

New User


Joined: 12 Jun 2005
Posts: 44
Location: Boston

PostPosted: Fri Jul 10, 2009 4:50 pm    Post subject: Syncsort to replace spaces with CCYYMMDD
Reply with quote

I have a file with data as below
M**********xxxxxxxx*****************
V*************************xxxxxxxx**

When the first variable is 'M':
I have to check if the xxxxxxxx location is spaces. If it is spaces, I need to replace it with a some hard-coded date.
When the first variable is 'V':
I have to check if the other xxxxxxxx location is spaces. If it is spaces, I need to replace it with a some hard-coded date.

Can this be done using Syncsort?
Back to top
View user's profile Send private message

bipinpeter

Active User


Joined: 18 Jun 2007
Posts: 208
Location: Cochin/Kerala/India

PostPosted: Fri Jul 10, 2009 6:16 pm    Post subject:
Reply with quote

Hi kkxlnc,
Use the below code

Code:
SORT FIELDS=COPY
INREC IFTHEN=(WHEN=(1,1,CH,EQ,C'M',AND,12,10,CH,EQ,C'XXXXXXXXXX'),OVERLAY=(12:C'12/10/2009')),
IFTHEN=(WHEN=(1,1,CH,EQ,C'V,AND,25,10,CH,EQ,C'XXXXXXXXXX'),OVERLAY=(12:C'11/10/2009'))


Here i am assuming that the hard coded date which you are inserting is different in both cases.If the hard coded value is same you can use the second condition along with first codition using OR keyword.
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 Count Trailing Spaces in variable str... Virendra Shambharkar SYNCSORT 10 Thu Feb 02, 2017 12:23 pm
No new posts SYNCSORT SEQNUM and FI fields. nartcr SYNCSORT 7 Sat Jan 21, 2017 4:02 am
No new posts Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts Syncsort - Hard coded Value in output PORYES SYNCSORT 1 Thu Nov 03, 2016 9:23 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us