Page 1 of 1

DM4/ for Previous Day

PostPosted: Mon Jul 15, 2013 11:56 am
by marg
Hi,

I am generating a report through JCL and the Report is to get the statistics of the previous day.

I have used DM4/ to get the current date. But could you please advise me on how to get a previous day value from DM4?

My Input File is as below:
================================
Statistics for DD/MM/CCYY
================================

My code is as below:

SORT FIELDS=COPY
INREC IFTHEN=(WHEN=(1,1,CH,NE,C'S'),BUILD=(1,180)),
IFTHEN=(WHEN=(1,1,CH,EQ,C'S'),
BUILD=(1,15,X,DATE=(DM4/)))



I use ICETOOL and the code above replaces DD/MM/CCYY with current date. But I would like to see the previous date.


Please advise.

Re: DM4/ for Previous Day

PostPosted: Mon Jul 15, 2013 9:16 pm
by skolusu
marg,

use the following control cards
//SYSIN    DD *                                               
  OPTION COPY                                                 
  INREC IFTHEN=(WHEN=(1,1,CH,EQ,C'S'),                       
  OVERLAY=(17:10X,DATE1-1,17:33,2,C'/',31,2,C'/',27,4,8X))   
//*

Re: DM4/ for Previous Day

PostPosted: Tue Jul 16, 2013 10:32 am
by marg
Thanks Kolusu.
It works.