Syncsort - put start and end quotes



Support for NetApp SyncSort for z/OS, Visual SyncSort, SYNCINIT, SYNCLIST and SYNCTOOL

Syncsort - put start and end quotes

Postby ranga_subham » Thu Jun 20, 2013 8:54 pm

Hi,

I have a list of datasets (differ in length) and want to apply single quote on beginning and ending of each dataset.

MERIAM.KIDE1.MARE2
MERIAM.SILJA1
MERIAM.FERET1.BODE2.BAREN3


Expected Output:
'MERIAM.KIDE1.MARE2'
'MERIAM.SILJA1'
'MERIAM.FERET1.BODE2.BAREN3'


Please help.

Thanks.
ranga_subham
 
Posts: 279
Joined: Fri Jul 18, 2008 7:46 pm
Has thanked: 0 time
Been thanked: 1 time

Re: Syncsort - put start and end quotes

Postby BillyBoyo » Thu Jun 20, 2013 11:10 pm

Experiment with and research something like this:

 INREC OVERLAY=(1:1,44,
                JFY=(SHIFT=LEFT,
                     LEAD=C'''',
                     TRAIL=C'''''))
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Syncsort - put start and end quotes

Postby ranga_subham » Fri Jun 21, 2013 4:31 pm

BillyBoyo, it has worked and I got the results after removing extra single quote in TRAIL ! :D

I was over-analyzing to achieve it with PARSE :oops: but don't know if that too was possible :roll:

Thanks a lot.
ranga_subham
 
Posts: 279
Joined: Fri Jul 18, 2008 7:46 pm
Has thanked: 0 time
Been thanked: 1 time

Re: Syncsort - put start and end quotes

Postby ranga_subham » Fri Jun 21, 2013 6:37 pm

another way of doing it but don't know efficient than what BillyBoyo suggested :?

//SYSIN    DD *                       
 SORT FIELDS=COPY                     
 INREC FIELDS=(C'''',1,44,C'''')       
 OUTREC FIELDS=(1,46,SQZ=(SHIFT=LEFT))


How to achieve the same with PARSE though :?: :x

Thanks.
ranga_subham
 
Posts: 279
Joined: Fri Jul 18, 2008 7:46 pm
Has thanked: 0 time
Been thanked: 1 time


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post