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
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm


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