Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
SyncSort - replace comma with spaces in a file using sort

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: SyncSort - replace comma with spaces in a file using sort
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

Site Director


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

PostPosted: Tue Oct 14, 2008 11:19 am    Post subject:
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    Post subject: Reply to: Sort - replace comma with spaces in a file using s
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

Site Director


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

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

Hello,

Try looking at this topic:
http://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    Post subject: Reply to: SyncSort - replace comma with spaces in a file usi
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: 2285
Location: @my desk

PostPosted: Tue Oct 14, 2008 1:32 pm    Post subject:
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: 2285
Location: @my desk

PostPosted: Tue Oct 14, 2008 1:39 pm    Post subject:
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    Post subject: Reply to: SyncSort - replace comma with spaces in a file usi
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: 8614
Location: Back in jolly old England

PostPosted: Tue Oct 14, 2008 2:30 pm    Post subject: Re: Reply to: SyncSort - replace comma with spaces in a file
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    Post subject: Reply to: SyncSort - replace comma with spaces in a file usi
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: 500
Location: USA

PostPosted: Wed Oct 15, 2008 2:11 am    Post subject:
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    Post subject: Reply to: SyncSort - replace comma with spaces in a file usi
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

Site Director


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

PostPosted: Wed Oct 15, 2008 9:33 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts File Tailoring -- Temporary dataset i... samzee71 CLIST & REXX 3 Fri Dec 01, 2017 3:12 am
No new posts Rexx - File tailoring samzee71 CLIST & REXX 10 Thu Nov 30, 2017 10:47 pm
No new posts Extract record for change in combinat... Trinadh DFSORT/ICETOOL 6 Thu Nov 23, 2017 3:32 pm
No new posts Moving a PS file as body of a mail! Vignesh Sid JCL & VSAM 4 Tue Nov 21, 2017 9:23 pm
No new posts unable to set RC = 4 when empty file migusd SYNCSORT 1 Tue Nov 21, 2017 1:21 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us