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

Syncsort: Extract by delimiter and convert in one pass?


IBM Mainframe Forums -> SYNCSORT
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Ben Drew

New User


Joined: 31 Oct 2013
Posts: 1
Location: USA

PostPosted: Thu Oct 31, 2013 6:51 pm
Reply with quote

I have a comma-delimited file that looks like this:

Code:

----+----1----+----2
99.1,4/24/88
7,12/15/02
33,6/3/92
100.5,12/1/01

I know how to parse by comma, right justify and get it to look like this:
Code:

----+----1----+----2
 99.1  4/24/88
    7 12/15/02
   33   6/3/92
100.5  12/1/01

But what would be even better would be if I could get it to look like this:
Code:

----+----1----+----2
 99.1 1988-04-24
  7.0 2002-12-15
 33.0 1992-06-03
100.5 1992-12-01

I've tried a number of things editing/reformatting subparameters, but apparently either I'm not doing it correctly, or they're not proper subcommands of the Parse or Build parameters.

Any ideas on whether this can be done in one pass???
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Oct 31, 2013 6:57 pm
Reply with quote

Yes. Not as part of PARSE, but you can specify multiple IFTHEN statements. You want to look at EDIT masks for fields, and look at date conversion functions.

There are examples here, I'm sure. Your favourite search engine will pick up more. You have a manual? Look up the functions, and do a search, you'll get examples.

If you get stuck, show what you tried, with sample input, expected output and what you got.
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 -> SYNCSORT

 


Similar Topics
Topic Forum Replies
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Need help for File Aid JCL to extract... Compuware & Other Tools 23
No new posts Need to convert date format DFSORT/ICETOOL 20
No new posts How to pass the PARM value to my targ... COBOL Programming 8
Search our Forums:

Back to Top