Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 995
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 File Aid tool to compare numeric data balaji81_k DFSORT/ICETOOL 0 Tue Sep 26, 2017 3:35 am
No new posts Compare yesterday's date to the one o... migusd SYNCSORT 8 Fri Sep 22, 2017 11:35 pm
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts BUILD OUTFIL based on condition other... balaji81_k DFSORT/ICETOOL 13 Fri Sep 08, 2017 11:06 pm
No new posts Moving values to a variable of copybo... Vignesh Sid COBOL Programming 6 Wed Sep 06, 2017 1:04 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us