Page 1 of 1

How to define previous day using system symbols in Symnames?

PostPosted: Fri Feb 03, 2012 1:00 pm
by skankatala
Hi......

When I am using //Symnames
I am able to define the Current day string using system symbols as CURRDATE,S'&LYR4..&LJDAY'

How to define previous day using the system symbols in the above format (i.e. YY.DDD) ?

Re: How to define previous day using system symbols in Symna

PostPosted: Fri Feb 03, 2012 2:36 pm
by BillyBoyo
Which sort product are you using?

Re: How to define previous day using system symbols in Symna

PostPosted: Fri Feb 03, 2012 2:48 pm
by NicC
Why not post in the appropriate section of the forum for your sort product? This is NOT a JCL question.

Re: How to define previous day using system symbols in Symna

PostPosted: Fri Feb 03, 2012 9:06 pm
by skankatala
BillyBoyo wrote:Which sort product are you using?


I am using DFSORT.

Re: How to define previous day using system symbols in Symna

PostPosted: Fri Feb 03, 2012 9:18 pm
by skankatala
skankatala wrote:Hi......

When I am using //Symnames in DFSORT
I am able to define the Current day string using system symbols as CURRDATE,S'&LYR4..&LJDAY'

How to define previous day using the system symbols in the above format (i.e. YY.DDD) ?


The format is YYYY.DDD.

Sorry for the wrong information...

Re: How to define previous day using system symbols in Symna

PostPosted: Fri Feb 03, 2012 9:19 pm
by skankatala
NicC wrote:Why not post in the appropriate section of the forum for your sort product? This is NOT a JCL question.


I apoligize for that. I do not repeat it again in future...

Re: How to define previous day using system symbols in Symna

PostPosted: Fri Feb 03, 2012 10:09 pm
by skolusu
if your intention is to get the current day-1 then you can use date3-1 which will give you the desired results.
//STEP0100 EXEC PGM=SORT         
//SYSOUT   DD SYSOUT=*           
//SORTIN   DD *                 
ABC                             
//SORTOUT  DD SYSOUT=*           
//SYSIN    DD *                 
  SORT FIELDS=COPY               
  INREC OVERLAY=(10:DATE3(.)-1) 
//*


the output of this is
----+----1----+----2
ABC      2012.033   

Re: How to define previous day using system symbols in Symna

PostPosted: Fri Feb 03, 2012 10:23 pm
by skankatala
skolusu wrote:if your intention is to get the current day-1 then you can use date3-1 which will give you the desired results.
//STEP0100 EXEC PGM=SORT         
//SYSOUT   DD SYSOUT=*           
//SORTIN   DD *                 
ABC                             
//SORTOUT  DD SYSOUT=*           
//SYSIN    DD *                 
  SORT FIELDS=COPY               
  INREC OVERLAY=(10:DATE3(.)-1) 
//*


the output of this is
----+----1----+----2
ABC      2012.033   


I did not expected this answer. But I modified my code and your answer helped me...
:D It worked... Thank you so much :)