Joined: 26 Nov 2002 Posts: 12380 Topics: 75 Location: San Jose
Posted: Thu Sep 02, 2004 5:39 pm Post subject:
Sterling Price,
DFSORT has the capability of performing arthimetic functions, but it cannot be used to calculate the differences between 2 dates, subtracting/adding 'n' days to current date etc..
Joined: 26 Nov 2002 Posts: 12380 Topics: 75 Location: San Jose
Posted: Mon Sep 06, 2004 7:46 am Post subject:
Sterling price,
The following JCL will give you the desired results. we use the DATE1 parm to get the current date in the format(YYYYMMDD). Since you want the month name of the last month , we use a change command to spell out the name of the last month. We also split the file into 2 files, when the month is 01 , we write it out to HDR1 file, else we write it out to HDR2 file.
When the month is 01, then we need to subtract 1 from the year to get the previous year. so at any point we will only create one header.Either HDR1 or HDR2 file.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum