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
 

 

Convert From Fixed Lenght to variable length file.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
surya anem

New User


Joined: 20 Dec 2007
Posts: 54
Location: Hyderabad

PostPosted: Thu Jan 15, 2009 12:59 pm    Post subject: Convert From Fixed Lenght to variable length file.
Reply with quote

I want to convert fixed length to a variable length file. I searched the forum but i found threads on variable to Fixed but not on viceversa. Is there any other easier way of doing the conversion without using the sort tools.

I used the following code

Code:

  SORT FIELDS=COPY       
  INREC BUILD=(1,125,SQZ=(SHIFT=LEFT,MID=C';'))
  OUTFIL FNAMES=FBVB1,FTOV                     


But the problem is in case a word has space in between, then the above code places a semicolon in between the word. Eg: if the name of the person is Green Field i want the output as Green Field; but the above code gives me the output as Green;Field.

Please help me in solving the above issue.
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Jan 15, 2009 1:14 pm    Post subject:
Reply with quote

What is it exactly that you want to do ?
Do you want to simply convert from FB to VB, or is something else involved ?
Back to top
View user's profile Send private message
surya anem

New User


Joined: 20 Dec 2007
Posts: 54
Location: Hyderabad

PostPosted: Thu Jan 15, 2009 1:16 pm    Post subject:
Reply with quote

I want to convert from Fixed length to variable length file, a comma delimited file.
Back to top
View user's profile Send private message
Garry Carroll

Active Member


Joined: 08 May 2006
Posts: 991
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Thu Jan 15, 2009 6:03 pm    Post subject:
Reply with quote

If your fixed length record has fixed length fields, you could first set the comma-delimiters at the fixed positions during INREC processing. Next, use the SQZ and MIDC functions to reduce the number of blanks during OUTREC processing.

Your 'Green Field ' would become 'Green Field ' (with a trailing blank).

See DFSORT Smart Tricks @
https://www.ibm.com/systems/support/storage/software/sort/mvs/tricks/

Garry.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Thu Jan 15, 2009 10:10 pm    Post subject:
Reply with quote

Quote:
Is there any other easier way of doing the conversion without using the sort tools.


Why would you ask this question in the DFSORT Forum? Ask it in a Forum appropriate for the tool you want to use or in a general forum about tools.

If you do want to use DFSORT, then give complete details of what you want to do. Show an example of the records in your input file and what you expect for output for the different variations you have to handle. Give the RECFM and LRECL of the input and output files.
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts Convert +9999999999999.99 to S9(12)V9(3) vnktrrd DFSORT/ICETOOL 8 Thu Nov 17, 2016 8:15 pm


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