MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

truncating leading spaces.

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
rajkumar_1981
Beginner


Joined: 05 Jan 2007
Posts: 5
Topics: 4

PostPosted: Thu Feb 14, 2008 6:17 am    Post subject: truncating leading spaces. Reply with quote

hi,

input file

field lenght is 50.
Code:

1............................................................50
                       adf dfdf   fdfeff fd
        adf dfddf
adfdfd
                                                adfdf
                     dfsdfa
            adfsdfa
                                                              a

output file
Code:

1............................................................50
adf dfdf   fdfeff fd
adf dfddf
adfdfd
adfdf
dfsdfa
adfsdfa
a


i want truncate all leading space from input file. i want to place the data from 1st starting position in the output file.

any utilities is there?
no program to be written for this. only utilities to be used.


please reply for the above query
Back to top
View user's profile Send private message
vkphani
Intermediate


Joined: 05 Sep 2003
Posts: 483
Topics: 48

PostPosted: Thu Feb 14, 2008 7:01 am    Post subject: Reply with quote

Do not open multiple threads on same topic.

You can use the below sort card.

Code:

//SYSIN   DD   *                                 
  OPTION COPY                                   
  INREC OVERLAY=(1,80,SQZ=(SHIFT=LEFT,MID=C' '))
/*                                                   
Back to top
View user's profile Send private message Send e-mail
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Thu Feb 14, 2008 11:39 am    Post subject: Reply with quote

SQZ would not give the correct solution in this case since it would squeeze out multiple blanks between fields and replace them with only one blank. For example,

Code:

adf dfdf   fdfeff fd 


would be output as:

Code:

adf dfdf fdfeff fd


JFY is the correct function to use in this case.

Here's a DFSORT job that will actually do what was requested:

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=... input file (FB/50)
//SORTOUT DD DSN=...  output file (FB/50)
//SYSIN    DD    *
  OPTION COPY
  INREC OVERLAY=(1,50,JFY=(SHIFT=LEFT))
/*

_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
mf_user
Intermediate


Joined: 01 Jun 2003
Posts: 372
Topics: 105

PostPosted: Thu Mar 06, 2008 8:11 am    Post subject: syncsort solution please? Reply with quote

Hi,

Would you please suggest syncsort solution for this trick?

TIA.
_________________
MF
==
Any training that does not include the emotions, mind and body is incomplete; knowledge fades without feeling.
==
Back to top
View user's profile Send private message Send e-mail
amargulies
Beginner


Joined: 10 Jan 2007
Posts: 123
Topics: 0

PostPosted: Thu Mar 06, 2008 11:01 am    Post subject: Reply with quote

MF,

Franks solution will work with SyncSort for z/OS 1.3.
_________________
Alissa Margulies
SyncSort Mainframe Product Services
201-930-8260
zos_tech@syncsort.com
Back to top
View user's profile Send private message Send e-mail
hari108
Beginner


Joined: 03 Feb 2006
Posts: 16
Topics: 4

PostPosted: Fri Oct 10, 2008 1:37 am    Post subject: Reply with quote

amargulies wrote:
MF,

Franks solution will work with SyncSort for z/OS 1.3.


Alissa,

Do we have any solution with SynSort for what Frank has suggested using DFSORT?

If so please let me know.
_________________
Thanks,
Hari
Back to top
View user's profile Send private message Yahoo Messenger
expat
Intermediate


Joined: 01 Mar 2007
Posts: 475
Topics: 9
Location: Welsh Wales

PostPosted: Fri Oct 10, 2008 4:23 am    Post subject: Reply with quote

Errrrrrr, did not Alissa answer your question ?

Please read her reply very carefully and if you have further questions please post them.
_________________
If it's true that we are here to help others,
then what exactly are the others here for ?
Back to top
View user's profile Send private message
hari108
Beginner


Joined: 03 Feb 2006
Posts: 16
Topics: 4

PostPosted: Wed Oct 15, 2008 12:23 am    Post subject: Reply with quote

Oops!! My mistake...I'm really Sorry bonk
_________________
Thanks,
Hari
Back to top
View user's profile Send private message Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group