View previous topic :: View next topic
|
Author |
Message |
krishnakumarramaraj
New User
Joined: 15 Nov 2005 Posts: 15 Location: chennai
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
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 |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Hi Krishana,
Please provide ur file record length & fornat & Sample input & output |
|
Back to top |
|
|
krishnakumarramaraj
New User
Joined: 15 Nov 2005 Posts: 15 Location: chennai
|
|
|
|
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 |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
|
|