suffix today's date.



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

suffix today's date.

Postby ranga_subham » Mon Aug 09, 2010 7:03 pm

Hi,

I get some data on daily basis into a file (LRECL=132, RECFM=FB) and I want to suffix current date to a word within that file.

Input:
----+----1----+----2----+----3----+----4
01 data record 1 harish
01 data record 2 harish 01
0d data record 3 date


I want the date 18th column to be like date_080910.

Output:
----+----1----+----2----+----3----+----4
01 data record 1 harish
01 data record 2 harish 01
0d data record 3 date_080910


How to achieve it using SORT? Please help.

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

Re: suffix today's date.

Postby Alissa Margulies » Mon Aug 09, 2010 10:44 pm

Here is a SyncSort for z/OS 1.3 job that will produce the requested output:
//SORT1 EXEC PGM=SORT 
//SORTIN  DD *   
01 DATA RECORD 1 HARISH   
01 DATA RECORD 2 HARISH 01
0D DATA RECORD 3 DATE     
//SORTOUT DD SYSOUT=*   
//SYSOUT  DD SYSOUT=*     
//SYSIN   DD *     
  SORT FIELDS=COPY   
  OUTREC IFTHEN=(WHEN=(18,4,CH,EQ,C'DATE'),OVERLAY=(22:C'_',&DATENS=(MDY)))
/*         
Alissa Margulies
Syncsort Mainframe Product Services
201-930-8260
zos_tech@syncsort.com
Alissa Margulies
Global moderator
 
Posts: 369
Joined: Tue Feb 26, 2008 11:15 pm
Location: USA
Has thanked: 1 time
Been thanked: 3 times

Re: suffix today's date.

Postby ranga_subham » Tue Aug 10, 2010 3:25 pm

Thanks a lot...... :)
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