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

How to eliminate trailing blanks using DFSORT?


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
krishnakumarramaraj

New User


Joined: 15 Nov 2005
Posts: 15
Location: chennai

PostPosted: Tue Jan 29, 2008 1:13 pm
Reply with quote

HI,

File is:
----+----1----+----2----+----3----+----4----+---
00169 ,20060703,1797391 , +40.46,0000000,
00169 ,20060707,1798726 , +27.81,0000000,
00169 ,20060707,1799200 , +40.44,0000000,
00169 ,20060110,1736318 , +66.64,0000000,

i want to eliminate the trailing spaces in field-1 & filed-3 ?
Plz give me solution in DFSORT.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Jan 29, 2008 1:23 pm
Reply with quote

use the search link to search the DFSORT/ICETOOL forum for "blanks"
and You will get a few hints on how to proceed

if You are in a hurry You better try to help Yourself
... the dfsort expert live in a different time zone, a few hours away icon_biggrin.gif
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Tue Jan 29, 2008 1:46 pm
Reply with quote

Hi Krishana,

Please provide ur file record length & fornat & Sample input & output
Back to top
View user's profile Send private message
krishnakumarramaraj

New User


Joined: 15 Nov 2005
Posts: 15
Location: chennai

PostPosted: Tue Jan 29, 2008 2:09 pm
Reply with quote

Hi Ekta,

It is X(80).

Input format is:
(1-9) 10 (11-18) 19 (20-27) 28
00169 , 20060703 , 1797391 , +40.46,0000000,
00169 , 20060707 , 1798726 , +27.81,0000000,
00169 , 20060707 , 1799200 , +40.44,0000000,
00169 , 20060110 , 1736318 , +66.64,0000000,
position 10th and 19 th and 28 is a comma
Output Format is:
(1-5) 6 (7-14) 15 (16-22) 23
00169 , 20060703 , 1797391 , +40.46,0000000,
00169 , 20060707 , 1798726 , +27.81,0000000,

That is the trailing blanks in (1-9) and (20-27) should be removed.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Tue Jan 29, 2008 10:13 pm
Reply with quote

Here's a DFSORT job that will do what you asked for:

Code:

//S1    EXEC  PGM=ICEMAN                       
//SYSOUT    DD  SYSOUT=*                       
//SORTIN DD *                                   
00169    ,20060703,1797391 ,+40.46,0000000,     
00169    ,20060707,1798726 ,+27.81,0000000,     
00169    ,20060707,1799200 ,+40.44,0000000,     
00169    ,20060110,1736318 ,+66.64,0000000,     
//SORTOUT DD SYSOUT=*                           
//SYSIN    DD    *                             
  OPTION COPY                                   
  INREC OVERLAY=(1,43,SQZ=(SHIFT=LEFT))         
/*


For more information on using DFSORT to squeeze out blanks, see:

publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CG20/2.4.13?DT=20060615173822
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts DFsort help with SUM() DFSORT/ICETOOL 12
No new posts DFSORT - VB file RDW getting overridden DFSORT/ICETOOL 3
Search our Forums:

Back to Top