Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
Hi all,
One of my step in the job generates a monthly report for the previous month (i.e., if the job is executed during March-2007, it generates report for the month of Feb-07).
Now my requirement is to put month and year (in yyyymm) in the report header (using header1 option).
I tried using date=(4md/), but it is inserting the current (system) date. Is it possible to write the previous month (i.e., 200702 in the header as per example given above).
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
You can do what you want with a DFSORT job like this. You'll need z/OS DFSORT V1R5 PTF UK90007 or DFSORT R14 PTF UK90006 (April, 2006) in order to use DFSORT's DATE2-d function. If you don't have the April, 2006 PTF, ask your System Programmer to install it (it's free). For complete details on all of the new DFSORT and ICETOOL functions available with the April, 2006 PTF, see:
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Quote:
Can't the date arithmetic be "DATE2-1" directly used in HEADER1?.
No. DATEn and variations are supported in BUILD, OVERLAY, COND, INCLUDE, OMIT and WHEN, but NOT in HEADERx or TRAILERx.
DATE=(...) and variations are supported in BUILD, OVERLAY, HEADERx and TRAILERx but there are no - or + forms for those variations.