How to get Julian date



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

How to get Julian date

Postby shailaja85 » Fri Feb 10, 2012 6:07 pm

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
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 » Fri Feb 10, 2012 7:11 pm

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
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 Akatsukami » Fri Feb 10, 2012 8:16 pm

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.
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1058
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: How to get Julian date

Postby bodatrinadh » Mon Feb 13, 2012 7:09 pm

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
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 13, 2012 9:16 pm

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.
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 13, 2012 11:18 pm

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
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 kiran_wiproblr » Tue Feb 14, 2012 12:07 am

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
kiran_wiproblr
 
Posts: 21
Joined: Fri Feb 10, 2012 11:10 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to get Julian date

Postby NicC » Tue Feb 14, 2012 1:01 am

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.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: How to get Julian date

Postby Nik22Dec » Tue Feb 14, 2012 6:47 pm

You can try accessing the below given link -

http://publibz.boulder.ibm.com/cgi-bin/ ... ilter=sort
Thanks,
Nik
User avatar
Nik22Dec
 
Posts: 68
Joined: Mon Dec 26, 2011 6:38 pm
Has thanked: 2 times
Been thanked: 0 time

Re: How to get Julian date

Postby Akatsukami » Tue Feb 14, 2012 7:28 pm

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
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1058
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Next

Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post