|
|
| Author |
Message |
scorp_rahul23
New User
Joined: 06 May 2008 Posts: 14 Location: Chennai
|
|
|
|
I want to remove starting spaces of a line
| Code: |
abcdsba
bsakbkd
backjsbcka
|
and want output like
| Code: |
abcdsba
bsakbkd
backjsbcka
|
Record length of file is 80 and number of spaces are not fixed means i have to remove spaces untill character is encountered.
I cant use ICEMAN or ICETOOL utility
could u suggest some ways for this |
|
| Back to top |
|
 |
References
|
Posted: Tue May 13, 2008 10:29 am Post subject: Re: Removing starting spaces in lines |
 |
|
|
 |
krisprems
Senior Member
Joined: 27 Nov 2006 Posts: 617 Location: India
|
|
|
|
| scorp_rahul23, Can you use SORT? |
|
| Back to top |
|
 |
scorp_rahul23
New User
Joined: 06 May 2008 Posts: 14 Location: Chennai
|
|
|
|
| Ya we can use SORT |
|
| Back to top |
|
 |
gcicchet
Active User
Joined: 28 Jul 2006 Posts: 293
|
|
|
|
Hi,
in REXX you can use the SPACE function.
Gerry |
|
| Back to top |
|
 |
scorp_rahul23
New User
Joined: 06 May 2008 Posts: 14 Location: Chennai
|
|
|
|
| I have to use only SORT or COBOL. not in rexx |
|
| Back to top |
|
 |
krisprems
Senior Member
Joined: 27 Nov 2006 Posts: 617 Location: India
|
|
| Back to top |
|
 |
scorp_rahul23
New User
Joined: 06 May 2008 Posts: 14 Location: Chennai
|
|
|
|
| Code: |
SORT FIELDS=COPY
OUTREC FIELDS=(1,255,SQZ=(SHIFT=LEFT)) |
i m getting this error
| Code: |
SORT FIELDS=COPY
OUTREC FIELDS=(1,255,SQZ=(SHIFT=LEFT))
*
WER268A OUTREC STATEMENT : SYNTAX ERROR
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
|
can u tell me what to do |
|
| Back to top |
|
 |
krisprems
Senior Member
Joined: 27 Nov 2006 Posts: 617 Location: India
|
|
|
|
when you are getting WERxxxx messages it means you are using SYNCSORT not DFSORT.
SQZ is available in SyncSort for z/OS Release 1.3. If you are using earlier versions of SYNCSORT you wont be able to use this feature.
Better go for a COBOL program! |
|
| Back to top |
|
 |
Moved: Tue May 13, 2008 12:57 pm by dick scherrer From DFSORT/ICETOOL to JCL |
scorp_rahul23
New User
Joined: 06 May 2008 Posts: 14 Location: Chennai
|
|
|
|
I have solved this using cobol code.
But i m still not sure whether this can be done using SORT only not using DFSORT tools  |
|
| Back to top |
|
 |
krisprems
Senior Member
Joined: 27 Nov 2006 Posts: 617 Location: India
|
|
|
|
| scorp_rahul23 wrote: |
I have solved this using cobol code.
But i m still not sure whether this can be done using SORT only not using DFSORT tools  |
To answer your question first of all i need to understand your knowledge about sort...
If you dont know, here is brief about DFSORT and SYNCSORT,
When you mention PGM=SORT or PGM=ICEMAN,
this invokes the underlying SORT product thats installed in your site, it may be DFSORT or SYNCSORT. In your case its SYNCSORT.
So, when you ask a question
| Quote: |
| whether this can be done using SORT only not using DFSORT tools |
, this doesnt make sense...
because SORT inturn is triggering the underlying DFSORT or SYNCSORT.
Hope you got the point that i am stressing on...! |
|
| Back to top |
|
 |
scorp_rahul23
New User
Joined: 06 May 2008 Posts: 14 Location: Chennai
|
|
|
|
Saying that does not mean I am saying its not possible in SORT.
I am saying I m not sure whether it can be done in Basic SORT utility not going for DFSORT or ICEMAN or ICETOOL
Thats it.
And thanks for ur help for cobol suggestion  |
|
| Back to top |
|
 |
enrico-sorichetti
Global Moderator
Joined: 14 Mar 2007 Posts: 2288 Location: italy
|
|
|
|
| Quote: |
| I am saying I m not sure whether it can be done in Basic SORT |
it would be better to review Your understanding of program' s features
there is no such a thing as basic sort
z_os does not provide any sort facilities/programs/functions
these will be provided only by add on priced products from different companies
for the sake of example the most referred to sort products on these forums are
dfsort by https://www-304.ibm.com/systems/support/storage/software/sort/mvs/
syncsort by http://www.syncsort.com/company/home.htm
when You pay for any of these products there are no different charge features
You get the full package, You like it or not, basic, advanced, tools ( call them any way You want )
under different names You get
the sort itself, DFSORT, ICEMAN, SORT, SYNCSORT
the sort tools, ICETOOL,SYNCTOOL
so no business reason ( apart sheer ignorance on the rule-setters side )
to forbid the usage of programs and facilities which are being paid for |
|
| Back to top |
|
 |
Pandiarajan Thavamani
New User
Joined: 19 May 2008 Posts: 1 Location: Chennai
|
|
|
|
It can be done using normal sort program.
//YB31CHEK JOB ,'COPY DRSCOPY TO DISK',CLASS=4,MSGCLASS=Y,
// NOTIFY=&SYSUID
//STEP01 EXEC PGM=SORT
//SORTIN DD DSN=XB48.TXHX0TRP.TEST,DISP=SHR
//SORTOUT DD DSN=XB48.TXHX0TRP.TEST1,DISP=OLD
//SYSOUT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
OUTREC FIELDS=(1:1,8,ZD,EDIT=(TTTTTTTT))
/* |
|
| Back to top |
|
 |
dick scherrer
Global Moderator
Joined: 23 Nov 2006 Posts: 6717 Location: 221 B Baker St
|
|
|
|
Hello Pandiarajan Thavamani and welcome to the forums,
Please check your reply and make sure the topic replied to is the one you intended. Your suggestion does not appear to be for this topic.
This topic has to do with eliminating leading spaces in data records while yours edits some numeric field. |
|
| Back to top |
|
 |
dick scherrer
Global Moderator
Joined: 23 Nov 2006 Posts: 6717 Location: 221 B Baker St
|
|
|
|
Hello,
Have you determined where your reply should be located (which topic it is a reply to)?
I'll relocate this when you say where it should go. |
|
| Back to top |
|
 |
|
|