Check the system time



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

Check the system time

Postby rward06 » Sat Oct 16, 2010 2:52 am

Hello,

I need to check the system time in SYNCSORT to determine what date I put into the ouput file. Basically if it's between midnight and 5pm I want to put yesterdays date otherwise I want to use todays.

SYNCSORT FOR Z/OS 1.3.2.

Input Data:
 INCLUDE COND=(1,1,CH,EQ,C'N',AND,184,10,CH,LE,C'CCYY-MM-DD')


Syncsort code:
 SORT FIELDS=COPY                               
 INREC IFTHEN=(WHEN=(50,10,CH,EQ,C'CCYY-MM-DD',
                AND,&TIME,LT,C'17:00:00'),     
               OVERLAY=(50:&DATE1(-)-1),       
       IFTHEN=(WHEN=(50,10,CH,EQ,C'CCYY-MM-DD',
                AND,&TIME,GE,C'17:00:00'),     
               OVERLAY=(50:&DATE1(-)))         


Error Message:
 SORT FIELDS=COPY                                           
 INREC IFTHEN=(WHEN=(50,10,CH,EQ,C'CCYY-MM-DD',             
                AND,&TIME,LT,C'17:00:00'),                 
                    *                                       
               OVERLAY=(50:&DATE1(-)-1),                   
       IFTHEN=(WHEN=(50,10,CH,EQ,C'CCYY-MM-DD',             
                AND,&TIME,GE,C'17:00:00'),                 
               OVERLAY=(50:&DATE1(-)))                     
WER901I  **WARNING** SYNCSORT 1.3.2.0 WILL EXPIRE IN 27 DAYS
WER268A  INREC STATEMENT   : SYNTAX ERROR                   


Currently it doesn't like my use of &TIME. I'm assuming you can only use it as an output field or just comapare it with other fields.

Any help is much appreciate.

Thanks,

Richard
rward06
 
Posts: 5
Joined: Sat Oct 16, 2010 2:40 am
Has thanked: 0 time
Been thanked: 0 time

Re: Check the system time

 

Re: Check the system time

Postby Alissa Margulies » Tue Nov 23, 2010 9:04 pm

Hello Richard.

The following SyncSort control statements should give you the requested output:
//SYSIN   DD *                                 
  INREC IFTHEN=(WHEN=INIT,OVERLAY=(81:&TIME)), 
        IFTHEN=(WHEN=(50,10,CH,EQ,C'CCYY-MM-DD',
                AND,81,8,CH,LT,C'17:00:00'),   
         BUILD=(1,49,50:&DATE1(-)-1,60,20)),     
        IFTHEN=(WHEN=(50,10,CH,EQ,C'CCYY-MM-DD',
                AND,81,8,CH,GE,C'17:00:00'),   
         BUILD=(1,49,50:&DATE1(-),60,20)),       
        IFTHEN=(WHEN=NONE,BUILD=(1,80))         
  SORT FIELDS=COPY                             
/*                                                           
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: 1 time

Re: Check the system time

Postby rward06 » Tue Nov 23, 2010 11:58 pm

That's brilliant! Thank you so much Alissa.
rward06
 
Posts: 5
Joined: Sat Oct 16, 2010 2:40 am
Has thanked: 0 time
Been thanked: 0 time


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post