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
 

 

Moving fields to a new file after truncating the spaces

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

New User


Joined: 09 Aug 2005
Posts: 67

PostPosted: Tue Oct 03, 2006 5:45 pm    Post subject: Moving fields to a new file after truncating the spaces
Reply with quote

Hi,

I have an input file which has 5 fields with pipe character "|" separating them. Theese fields might contain spaces, my requirement is to move these fields to a new file after truncating the spaces. There is no specific position where the spaces start for a field.

For example if my input file is "A |BC |CD |DEF |DF |"
I want output file as A|BC|CD|DEF|DF.

Thanks,
Bonnie
Back to top
View user's profile Send private message

cooolguy

New User


Joined: 05 Sep 2006
Posts: 9

PostPosted: Tue Oct 03, 2006 8:20 pm    Post subject: Re: Sort?
Reply with quote

How big is the file?

If it is not big then use change all command
i.e. C ALL ' ' ''

This will do the work you need
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: Tue Oct 03, 2006 8:53 pm    Post subject:
Reply with quote

Bonnie,

You can do this quite easily with DFSORT's new SQZ function. I assumed your input file has RECFM=FB and LRECL=80, but the job can be changed appropriately for other attributes. Here's the job:

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD *
A |BC |CD |DEF |DF |
/*
//SORTOUT DD SYSOUT=*
//SYSIN    DD    *
  OPTION COPY
  INREC BUILD=(1,80,SQZ=(SHIFT=LEFT))
/*


SORTOUT would have:

Code:

A|BC|CD|DEF|DF|


You'll need z/OS DFSORT V1R5 PTF UK90007 or DFSORT R14 PTF UK90006 (April, 2006) in order to use DFSORT's SQZ function. If you don't have the April, 2006 PTF, ask your System Programmer to install it (it's free). For complete details on all of the new DFSORT and ICETOOL functions available with the April, 2006 PTF, see:

www.ibm.com/servers/storage/support/software/sort/mvs/peug/
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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts Sum Fields ballaswaroop DFSORT/ICETOOL 4 Tue May 02, 2017 11:07 am


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