Adding a SUFFIX to a field



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

Adding a SUFFIX to a field

Postby RajeshT » Wed Feb 23, 2011 9:52 pm

Hi,

I'm trying to add a SUFFIX to a particular field. PARTNER NAME is the field starts at 75 position with a length of 35 characters. I wanted to add a SUFFIX at the end of PARTNER name. Though the LENGTH of the field is 35, am not sure about the LENGTH of the value it is going to be at this particular position.

Example Input :-
ACOSTA
KENDERLFLOREL
PEPSICO

Expected Output :-
ACOSTA(5010)
KENDERLFLOREL(5010)
PEPSICO(5010)

Here is what i have used initially, but then i have realized that i need it to be added as a SUFFIX, but not a PREFIX.
//SYSIN DD *
SORT FIELDS=COPY
IFTHEN=(WHEN=(44,2,CH,EQ,C'NA'),
OVERLAY=(81:75,35,75:C'(5010)',374:&DATENS=(MDY),
380:&TIMENS=(24),386:C'00VUP'))
/*

Please suggest.
RajeshT
 
Posts: 22
Joined: Tue May 04, 2010 10:19 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Adding a SUFFIX to a field

 

Re: Adding a SUFFIX to a field

Postby Thampy » Fri Feb 25, 2011 5:05 am

Rajesh,
You can modify your OVERLAY to include SQZ subparameter as given below. You can add the overlay fields accordingly.
IFTHEN=(WHEN=(44,2,CH,EQ,C'NA'),
OVERLAY=(75:75,35,SQZ=(SHIFT=LEFT,TRAIL=C'(5010)'))
Thampy
 
Posts: 35
Joined: Sat Sep 26, 2009 2:27 pm
Has thanked: 0 time
Been thanked: 3 times

Re: Adding a SUFFIX to a field

Postby RajeshT » Tue Mar 01, 2011 6:44 pm

Hi Thampy,

Thank you for the response and it worked for me perfectly. Have a good day.

Rajesh.
RajeshT
 
Posts: 22
Joined: Tue May 04, 2010 10:19 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Adding a SUFFIX to a field

Postby ranga_subham » Tue Mar 01, 2011 7:35 pm

this is cool :o I like it. :D

two suggestions:

1). INREC statement is missing
2). Another ')' is required in the end -OVERLAY=(75:75,35,SQZ=(SHIFT=LEFT,TRAIL=C'(5010)'))


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

Re: Adding a SUFFIX to a field

Postby dick scherrer » Wed Mar 02, 2011 2:15 am

Hello,

If the posted soltion works perfectly, why are any suggestions needed . . . :?

d
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post