print julian date in header using sort



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

print julian date in header using sort

Postby rgollapa » Wed Feb 22, 2012 8:48 pm

Hi,

can someone let me know how to print the Julian date in header record.

i have a requirement where i need to print the julian date in YYYYDDD format.
rgollapa
 
Posts: 2
Joined: Wed Feb 22, 2012 5:03 pm
Has thanked: 0 time
Been thanked: 0 time

Re: print julian date in header using sort

Postby bodatrinadh » Wed Feb 22, 2012 10:27 pm

Rgollapa,

Try this snippet.

//STEP1    EXEC PGM=SORT                                         
 //SYSOUT   DD SYSOUT=*                                           
 //SORTIN   DD *                                                   
 HEADER                                                           
 REC1                                                             
 REC2                                                             
 REC3                                                             
 REC4                                                             
 //SORTOUT   DD SYSOUT=*                                           
 //SYSIN    DD *                                                   
  SORT FIELDS=COPY                                                 
  INREC IFTHEN=(WHEN=(1,10,SS,EQ,C'HEADER'),                       
         OVERLAY=(15:DATE3))                                       
 //*   

Output :-

HEADER        2012053                   
REC1                                   
REC2                                   
REC3                                   
REC4                                                                                           



Thanks
-3nadh
Thanks
-3nadh
User avatar
bodatrinadh
 
Posts: 67
Joined: Thu Jan 12, 2012 9:05 pm
Has thanked: 0 time
Been thanked: 4 times

Re: print julian date in header using sort

Postby rgollapa » Thu Feb 23, 2012 10:02 am

below is my sort card
//SYSIN DD *
OPTION COPY
OUTFIL REMOVECC,
HEADER1=('00256AR50 ',
'11004CMS ',
DATENS=(MD4),[/color]TIMENS=(24)),
INCLUDE=(92,3,CH,EQ,C'750'),
TRAILER1=('00256AR59 ',
'11004CMS ',
COUNT=(M11,LENGTH=10),
TOT=(157,20,SFF,EDIT=(STTTTTTTTTTTTTTT.TT),SIGNS=(+,-)))
/*

in this DATENS should have value YYYYDDD date format.
can you please help on this.
rgollapa
 
Posts: 2
Joined: Wed Feb 22, 2012 5:03 pm
Has thanked: 0 time
Been thanked: 0 time

Re: print julian date in header using sort

Postby bodatrinadh » Thu Feb 23, 2012 3:13 pm

Replace DATENS=(MD4) with &YDDDNS=(4D)).

Thanks
-3nadh
Thanks
-3nadh
User avatar
bodatrinadh
 
Posts: 67
Joined: Thu Jan 12, 2012 9:05 pm
Has thanked: 0 time
Been thanked: 4 times


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post