View previous topic :: View next topic
|
Author |
Message |
Ashima Bansal
New User
Joined: 10 Oct 2008 Posts: 6 Location: Chennai
|
|
|
|
Hi
I have a file. I need to scan the whole file and search for the commas and replace that with space. Position of commas I can't specify.I need to do this using Syncsort utility.
I can use DFSORT's FINDREP function to do it like this:
Code: |
OPTION COPY
INREC FINDREP=(IN=C',',OUT=C' ')
|
Is there any way to do the same using Syncsort. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello Ashima and welcome to the forum,
Which sort product is in use on your system?
If you are not sure, run any sort and the product/release info is at the top of the informational output generated by the sort. |
|
Back to top |
|
|
Ashima Bansal
New User
Joined: 10 Oct 2008 Posts: 6 Location: Chennai
|
|
|
|
Thanks for responding!
SORT Product using in our system is : SYNCSORT FOR Z/OS 1.2.2.2R |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
Back to top |
|
|
Ashima Bansal
New User
Joined: 10 Oct 2008 Posts: 6 Location: Chennai
|
|
|
|
Hi,
I looked at this topic , But this is just like a mass file and I can't specify the position. I want to do this without specifying the position. |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
If you've Fileaid, you can make use of the below job to achieve this.
Code: |
//STEP0001 EXEC PGM=FILEAID
//SYSPRINT DD SYSOUT=*
//DD01 DD *
ABC,DEF,GHI
AB,CD,EFG,H
//DD01O DD SYSOUT=*
//SYSIN DD *
*
$$DD01 COPY OUT=0,EDITALL=(1,0,C",",C" ") |
DD01O
Code: |
ABC DEF GHI
AB CD EFG H |
|
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Alternately you can use the ALTSEQ command in Syncsort to achieve this.
Code: |
//STEP0001 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
ABC,DEF,GHI
AB,CD,EFG,H
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
ALTSEQ CODE=(6B40)
OUTREC FIELDS=(1,80,TRAN=ALTSEQ) |
SORTOUT
Code: |
ABC DEF GHI
AB CD EFG H |
|
|
Back to top |
|
|
Ashima Bansal
New User
Joined: 10 Oct 2008 Posts: 6 Location: Chennai
|
|
|
|
Thanks ! ALTSEQ command works.
But i don't know what is this 6B40 in ALTSEQ command?
ALTSEQ CODE=(6B40)
Could you please tell me ? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Ashima Bansal wrote: |
But i don't know what is this 6B40 in ALTSEQ command?
ALTSEQ CODE=(6B40)
Could you please tell me ? |
Do you NOT have access to any manuals at your shop ? |
|
Back to top |
|
|
Ashima Bansal
New User
Joined: 10 Oct 2008 Posts: 6 Location: Chennai
|
|
|
|
Sorry for inconvenience ! I'll check for that.
Anyways Thanks! |
|
Back to top |
|
|
Alissa Margulies
SYNCSORT Support
Joined: 25 Jul 2007 Posts: 496 Location: USA
|
|
|
|
Ashima Bansal,
If you can locate a SyncSort for z/OS 1.2 or 1.3 Programmer's Guide, ALTSEQ is fully documented on pages 2.16-2.17. However, if you are unable to locate a set of manuals, please feel free to contact me offline and I would be happy to assist you further. You can either send me a PM or email me at alissa.margulies@syncsort.com. |
|
Back to top |
|
|
Ashima Bansal
New User
Joined: 10 Oct 2008 Posts: 6 Location: Chennai
|
|
|
|
Thanks for your help! Surely if I will get stuck I'll mail you.
Thanks alot! |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
Surely if I will get stuck I'll mail you. |
If your organization is licensed, i'd surely recommend working with Alissa to get the material for your release downloaded now rather than waiting until there is something urgent. It is quite handy when available
FWIW. . . |
|
Back to top |
|
|
|