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
 

 

How to eliminate trailing blanks using DFSORT?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: How to eliminate trailing blanks using DFSORT?
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10231
Location: italy

PostPosted: Tue Jan 29, 2008 1:23 pm    Post subject: Reply to: How to eliminate trailing blanks using DFSORT?
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: 1187
Location: Bangalore,India

PostPosted: Tue Jan 29, 2008 1:46 pm    Post subject:
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    Post subject: The record layout,input & output format.
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 Moderator


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

PostPosted: Tue Jan 29, 2008 10:13 pm    Post subject:
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:

http://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    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 DFSORT MUL FIELDS tspr52 DFSORT/ICETOOL 16 Fri Mar 03, 2017 11:53 pm
No new posts Count Trailing Spaces in variable str... Virendra Shambharkar SYNCSORT 10 Thu Feb 02, 2017 12:23 pm
No new posts How to get the remainder and quotient... vnktrrd DFSORT/ICETOOL 2 Mon Oct 31, 2016 10:59 am
No new posts Change date (DD/MM/YY) in 2nd record ... uday kiran DFSORT/ICETOOL 12 Wed Sep 07, 2016 10:57 pm
No new posts DFSORT sorting only specific records akodakka DFSORT/ICETOOL 4 Thu Aug 04, 2016 11:24 am


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