IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

SyncSort - replace comma with spaces in a file using sort


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Ashima Bansal

New User


Joined: 10 Oct 2008
Posts: 6
Location: Chennai

PostPosted: Tue Oct 14, 2008 9:51 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Oct 14, 2008 11:19 am
Reply with quote

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
View user's profile Send private message
Ashima Bansal

New User


Joined: 10 Oct 2008
Posts: 6
Location: Chennai

PostPosted: Tue Oct 14, 2008 11:34 am
Reply with quote

Thanks for responding!

SORT Product using in our system is : SYNCSORT FOR Z/OS 1.2.2.2R
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Oct 14, 2008 12:07 pm
Reply with quote

Hello,

Try looking at this topic:
ibmmainframes.com/viewtopic.php?t=8118
Back to top
View user's profile Send private message
Ashima Bansal

New User


Joined: 10 Oct 2008
Posts: 6
Location: Chennai

PostPosted: Tue Oct 14, 2008 12:35 pm
Reply with quote

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
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Tue Oct 14, 2008 1:32 pm
Reply with quote

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
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Tue Oct 14, 2008 1:39 pm
Reply with quote

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
View user's profile Send private message
Ashima Bansal

New User


Joined: 10 Oct 2008
Posts: 6
Location: Chennai

PostPosted: Tue Oct 14, 2008 2:28 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Oct 14, 2008 2:30 pm
Reply with quote

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
View user's profile Send private message
Ashima Bansal

New User


Joined: 10 Oct 2008
Posts: 6
Location: Chennai

PostPosted: Tue Oct 14, 2008 2:35 pm
Reply with quote

Sorry for inconvenience ! I'll check for that.

Anyways Thanks!
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 496
Location: USA

PostPosted: Wed Oct 15, 2008 2:11 am
Reply with quote

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
View user's profile Send private message
Ashima Bansal

New User


Joined: 10 Oct 2008
Posts: 6
Location: Chennai

PostPosted: Wed Oct 15, 2008 8:43 am
Reply with quote

Thanks for your help! Surely if I will get stuck I'll mail you.
Thanks alot!
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Oct 15, 2008 9:33 am
Reply with quote

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 icon_wink.gif

FWIW. . .
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top