Page 1 of 3

How to get Julian date

PostPosted: Fri Feb 10, 2012 6:07 pm
by shailaja85
Hi All,

Would you please help me out? The below is my requirement.

In a report I have Julian date at 1st position and some text on 17th(9 bytes) column

I would like to get instances of text which is in 14th column, if 3rd position is having yesterdays Julian date.

input
2012/039        RAJU
2012/039        KAVI
2012/039        SHYAM


output
RAJU
KAVI
SHYAM



Please help me out in this regards,
Many thanks for your anticipated help.

Regards,
Shailaja

Re: How to get Julian date

PostPosted: Fri Feb 10, 2012 7:11 pm
by shailaja85
Sorry for TYPO error in my previous post.

I would like to get instances of text which is in 17th column, if 3rd position is having yesterdays Julian date.

And also please let me know links where I can get Syncsort/Synctool manuals

Re: How to get Julian date

PostPosted: Fri Feb 10, 2012 8:16 pm
by Akatsukami
shailaja85 wrote:And also please let me know links where I can get Syncsort/Synctool manuals

Syncsort, Synctool, and its documentation are proprietary products. If your shop is licensed, it either has the manuals or can get them for the asking; if it isn't, a number of people are going to be perp-walked out.

Re: How to get Julian date

PostPosted: Mon Feb 13, 2012 7:09 pm
by bodatrinadh
Shilaja,

You can try this code...

//STEP1    EXEC PGM=SORT                                           
//SYSOUT   DD SYSOUT=*                                             
//SORTIN   DD *                                                     
2012/043        RAJU                                               
2012/043        KAVI                                               
2012/043        SHYAM                                               
2012/040        ZZZZZZ                                             
//SORTOUT  DD SYSOUT=*                                             
//SYSIN    DD *                                                     
  INREC IFTHEN=(WHEN=INIT,OVERLAY=(1:1,4,5:6,3,8X,17:17,10,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:17,30),INCLUDE=(50,1,ZD,EQ,1)           



Note :- tested in SYNCSORT FOR Z/OS 1.4.0.1R version

Thanks
-3nadh

Re: How to get Julian date

PostPosted: Mon Feb 13, 2012 9:16 pm
by shailaja85
Hi Bodatrinadh,


Excellent!!!!!!!!, I am happy to say that, it is working

Many thanks for helping me out.

But my exactly my i/p data set is having data like below
----+----1----+----2----+
. 2012/039  AA.BB.CC.

Could you please provide updated sort card for that?

Expected output is same, ONLY change in I/P file.

Re: How to get Julian date

PostPosted: Mon Feb 13, 2012 11:18 pm
by bodatrinadh
check this out

//*                                                                     
//STEP1    EXEC PGM=SORT                                               
//SYSOUT   DD SYSOUT=*                                                 
//SORTIN   DD *                                                         
----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
  2012/043  TST.SORT.PDS                                               
  2012/043  TST.COBOL.PDS                                               
  2012/043  TST.SAS.PDS                                                 
  2012/040  TST.FTP.PDS                                                 
//SORTOUT  DD SYSOUT=*                                                 
//SYSIN    DD *                                                         
  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)               


And your output -

 TST.SORT.PDS   
 TST.COBOL.PDS   
 TST.SAS.PDS     


Thanks
-3nadh

Re: How to get Julian date

PostPosted: Tue Feb 14, 2012 12:07 am
by kiran_wiproblr
Hi Bodatrinadh,

Thanks, I am able to get output what I want,

BUT I am NOT very sure how the code is working.

Could you please let me know where I can get Syncsort documents/Link? OR
Is there any way so that I can see all keywords/topics in mainframe help(QW ??)
we are using SYNCSORT FOR Z/OS 1.3.2.0R

Re: How to get Julian date

PostPosted: Tue Feb 14, 2012 1:01 am
by NicC
You can get the documentation from within your company - someone has copies IF you have a legal installation of SYNCSORT. If no one can find a copy (unlikely) then apply to the vendor for new copies.

Re: How to get Julian date

PostPosted: Tue Feb 14, 2012 6:47 pm
by Nik22Dec
You can try accessing the below given link -

http://publibz.boulder.ibm.com/cgi-bin/ ... ilter=sort

Re: How to get Julian date

PostPosted: Tue Feb 14, 2012 7:28 pm
by Akatsukami
Nik22Dec wrote:You can try accessing the below given link -

http://publibz.boulder.ibm.com/cgi-bin/ ... ilter=sort

Of course, he still won't find any Syncsort documentation at an IBM web site :P