Date Manipulation



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

Date Manipulation

Postby ibmmf4u » Tue Mar 27, 2012 9:57 pm

Hi,

Can someone provide me the sort card to subtract one day from the date field which is in mmddyy format from the input file and write it to an output file

For Ex:-

Input file:-

032612
032712



The expected output file:-

Output file:-

032512
032612
ibmmf4u
 
Posts: 65
Joined: Wed Dec 14, 2011 10:26 pm
Has thanked: 0 time
Been thanked: 1 time

Re: Date Manipulation

Postby Alissa Margulies » Tue Mar 27, 2012 10:34 pm

Hello ibmmf4u.

Here is a Syncsort MFX for z/OS 1.4 solution:

//STEP1 EXEC PGM=SORT,PARM='CENTWIN=80'     
//SORTIN  DD *                             
032612                                     
032712                                     
//SORTOUT DD SYSOUT=*                       
//SYSOUT  DD SYSOUT=*                       
//SYSIN   DD *                             
  SORT FIELDS=COPY   
  OUTREC FIELDS=(DATEADD=(1,6,DTNS,-1,DAY)) 
/*                                         
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: Date Manipulation

Postby ibmmf4u » Tue Mar 27, 2012 10:55 pm

Hi Alissa,

Thanks for the quick reply. we are currently using Z/OS 1.3.2.2R in our shop.

I tried the above code, it gave me an error.

Is it possible to achieve the same in 1.3.2.2R version??If not can you provide me any alternate solution.

Thanks in advance!!
ibmmf4u
 
Posts: 65
Joined: Wed Dec 14, 2011 10:26 pm
Has thanked: 0 time
Been thanked: 1 time

Re: Date Manipulation

Postby ibmmf4u » Tue Mar 27, 2012 11:07 pm

Hi Alissa,

Pasted below is the error message which i encounter while executing the above program!!

SYNCSORT FOR Z/OS  1.3.2.2R       
           
SYSIN :                                                                 
  SORT FIELDS=COPY                                                     
    OUTREC FIELDS=(DATEADD=(1,6,DTNS,-1,DAY))                           
                   *                                                   
WER268A  OUTREC STATEMENT  : SYNTAX ERROR                               
WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000                           
WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE                           


Please help me out!!
ibmmf4u
 
Posts: 65
Joined: Wed Dec 14, 2011 10:26 pm
Has thanked: 0 time
Been thanked: 1 time

Re: Date Manipulation

Postby Alissa Margulies » Tue Mar 27, 2012 11:18 pm

Date arithmetic is not supported in SyncSort for z/OS 1.3. That is why you are receiving the syntax error. You must upgrade to release 1.4 to avoid this error.

Regards,
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


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post