Page 2 of 3

Re: How to get Julian date

PostPosted: Thu Feb 16, 2012 6:17 pm
by Nik22Dec
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.

Re: How to get Julian date

PostPosted: Mon Feb 20, 2012 8:53 am
by shailaja85
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)),

Re: How to get Julian date

PostPosted: Mon Feb 20, 2012 2:59 pm
by bodatrinadh
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

Re: How to get Julian date

PostPosted: Mon Feb 20, 2012 5:22 pm
by shailaja85
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.

Re: How to get Julian date

PostPosted: Mon Feb 20, 2012 6:25 pm
by bodatrinadh
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

Re: How to get Julian date

PostPosted: Thu Feb 23, 2012 9:03 pm
by Alissa Margulies
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,

Re: How to get Julian date

PostPosted: Sun Apr 01, 2012 1:16 pm
by shailaja85
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

Re: How to get Julian date

PostPosted: Sun Apr 01, 2012 1:27 pm
by shailaja85
Hi,

Please find latest boda3nath post for the sort card (which will explain step by step)

Re: How to get Julian date

PostPosted: Sun Apr 01, 2012 2:25 pm
by BillyBoyo
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.

Re: How to get Julian date

PostPosted: Sun Apr 01, 2012 2:46 pm
by NicC
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?