How to get Julian date



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

Re: How to get Julian date

Postby Nik22Dec » Thu Feb 16, 2012 6:17 pm

Sorry!! I did not realize that the product being used is SyncSort & not DFSort. :oops:

SyncSort Documentation is available only with the installation unlike, DFSort documentataion which is avaialbe free of cost.
Thanks,
Nik
User avatar
Nik22Dec
 
Posts: 68
Joined: Mon Dec 26, 2011 6:38 pm
Has thanked: 2 times
Been thanked: 0 time

Re: Re: How to get Julian date

 

Re: How to get Julian date

Postby shailaja85 » Mon Feb 20, 2012 8:53 am

Hi Bodatrinadh/ Some one else

Can you please explain me what the below statement will do?
70:3,5,Y2T,DTNS=(MD4),20X)from the above recent Bodatrinadh post?

OR/AND

Please provide correct syntax (OUTREC/BUILD) to see out put of the below Bodatrinadh OVERLAY statement, so that I can understand what 70:3,5,Y2T,DTNS=(MD4),20X will do exactly?

The below is code from Bodatrinadh post

INREC IFTHEN=(WHEN=INIT,OVERLAY=(1:1,4,5:6,3,8X,17:17,10,50:DATE,
                70:3,5,Y2T,DTNS=(MD4),20X)),
shailaja85
 
Posts: 20
Joined: Fri Feb 10, 2012 5:52 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to get Julian date

Postby bodatrinadh » Mon Feb 20, 2012 2:59 pm

shailaja85,


Can you please explain me what the below statement will do?
70:3,5,Y2T,DTNS=(MD4),20X)from the above recent Bodatrinadh post?



The Output of OVERLAY=(1:1,4,5:6,3 is YYYYddd which is a Y2T format in Syncsort (YYYY = Year and ddd=julian date).
So, at 70:3,5 i'm reading date as Y2T format ( which is generated from OVERLAY=(1:1,4,5:6,3) and converting into MMDDYY format using
DTNS=(MD4).

If you have a Mainframe test/devl region, you can try my code in step by step and check the output...

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: How to get Julian date

Postby shailaja85 » Mon Feb 20, 2012 5:22 pm

Bodatrinadh,

Many thanks for your explanation,
I tried to split step by step, but I am getting some syntax errors,
Can you please split into different steps, so that by seeing output of every step and I will understand.
shailaja85
 
Posts: 20
Joined: Fri Feb 10, 2012 5:52 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to get Julian date

Postby bodatrinadh » Mon Feb 20, 2012 6:25 pm

Here is the step by step process. Be carefull in giving commas ",".

Step 1:-

 INREC IFTHEN=(WHEN=INIT,OVERLAY=(1:3,4,5:8,3,4X,13:13,20,50:DATE,
               70:3,5,Y2T,DTNS=(MD4),20X))                       
 SORT FIELDS=COPY                                                 


Step 2:-
INREC IFTHEN=(WHEN=INIT,OVERLAY=(1:3,4,5:8,3,4X,13:13,20,50:DATE,
              70:3,5,Y2T,DTNS=(MD4),20X)),                       
      IFTHEN=(WHEN=(50,2,ZD,EQ,70,2,ZD,&,56,2,ZD,EQ,76,2,ZD),     
      BUILD=(1,4,C'/',5,30,53,2,ZD,SUB,72,2,ZD))                 
SORT FIELDS=COPY                                                 


Step 3:-

INREC IFTHEN=(WHEN=INIT,OVERLAY=(1:3,4,5:8,3,4X,13:13,20,50:DATE,     
                70:3,5,Y2T,DTNS=(MD4),20X)),                           
        IFTHEN=(WHEN=(50,2,ZD,EQ,70,2,ZD,&,56,2,ZD,EQ,76,2,ZD),         
   BUILD=(1,4,C'/',5,30,53,2,ZD,SUB,72,2,ZD))                           
  SORT FIELDS=COPY                                                     
  OUTFIL REMOVECC,BUILD=(1:13,20),INCLUDE=(50,1,ZD,EQ,1) 


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: How to get Julian date

Postby Alissa Margulies » Thu Feb 23, 2012 9:03 pm

Nik22Dec wrote:SyncSort Documentation is available only with the installation unlike, DFSort documentataion which is avaialbe free of cost.

Syncsort documentation is free to all licensed customers. If you are a licensed customer, please contact me offline at alissa.margulies@syncsort.com and I would be happy to assist you with obtaining a copy of the manuals.

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: 1 time

Re: How to get Julian date

Postby shailaja85 » Sun Apr 01, 2012 1:16 pm

Hi Boda3Nath,

The below sort card which you have given will not work when if current date is 1st date of every month,

Today I have faced the problem as today is 1st of april

In the below condition your checking for current month and year
IFTHEN=(WHEN=(50,2,ZD,EQ,70,2,ZD,&,56,2,ZD,EQ,76,2,ZD),


INREC IFTHEN=(WHEN=INIT,OVERLAY=(1:3,4,5:8,3,4X,13:13,20,50:DATE,     
                70:3,5,Y2T,DTNS=(MD4),20X)),                           
        IFTHEN=(WHEN=(50,2,ZD,EQ,70,2,ZD,&,56,2,ZD,EQ,76,2,ZD),         
   BUILD=(1,4,C'/',5,30,53,2,ZD,SUB,72,2,ZD))                           
  SORT FIELDS=COPY                                                     
  OUTFIL REMOVECC,BUILD=(1:13,20),INCLUDE=(50,1,ZD,EQ,1)           




Can you please provide updated code, so that it will work independent of first day of month and year?

If you are not clear of my requirement please see below


Input file:
----+----1----+----2----+
. 2012/091  AA.BB.CC.
. 2012/091  AA.BB.CC.
. 2012/091  AA.BB.CC.

if yesterday’s Julian date present from 3rd position to 10th position, I need in out file from 12th poison (as similar in above code
shailaja85
 
Posts: 20
Joined: Fri Feb 10, 2012 5:52 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to get Julian date

Postby shailaja85 » Sun Apr 01, 2012 1:27 pm

Hi,

Please find latest boda3nath post for the sort card (which will explain step by step)
shailaja85
 
Posts: 20
Joined: Fri Feb 10, 2012 5:52 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to get Julian date

Postby BillyBoyo » Sun Apr 01, 2012 2:25 pm

You've had plenty of time to locate Syncsort documentation. Consult it and select a method to convert the run date into a Julian date. It is then easy enough to subtract one from that. If there are no functions to do this, you can do it "manually" with the special case of "today" being 1st January each year. Easiest way to get that "yesterday" with nothing built-in is to convert "(yyyy-1)1231" to Julian.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: How to get Julian date

Postby NicC » Sun Apr 01, 2012 2:46 pm

As BillyBoyo has stated, you have had ample time to get the documentation/trained. This now seems to be using the forum to get the work, that you are paid to do, done for you. Are you going to compensate Bodatrinadh for his time and experience which he is giving here?
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2690
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisys (almost)
Has thanked: 4 times
Been thanked: 105 times

PreviousNext

Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post