I have create a dynamic card everyday by replacing the
DSN01 = ABC.XXX.YYY.DMMDDYY with
ABC.XXX.YYY.D102407 (month/date/year) so that current file is transmitted every day.
Currently we are doing this in cobol program. I believe there should a much easier Solution using DFSORT using Date functions?
The location of MMDDYY in the record varies depending on the DSN name length and we need to do inspect every record if MMDDYY is there and replace it with current date.
but strictly speaking we should not replace MMDDYY other than in &DSN01 but I assume MMDDYY will not be found in any other line in the control card.
Joined: 20 Jan 2007 Posts: 684 Location: Hollywood
I believe in NDM, if you give dataset name with xx.dYYMMDD.ThhmmssT then then the literals YYMMDDD gets replaced with actual value and transmitted. We dont need to put the actual value, NDM does it.
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
Deepa,
Does the file creation and transmission occur in the SAME JOB? If not what is the delay time? When does the creation job and transmission run (post with time)?
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Quote:
The location of MMDDYY in the record varies depending on the DSN name length
Deepa,
I guess Krisprems missed this because his solution assumes the Ddate will always start in position 21. From what you said, it can start in other positions. Some examples:
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Deepa,
Here's a DFSORT job that will handle any number of qualifiers. The trick is to use ENDBEFR=C'.DMMDDYY' in PARSE. Also, I used DATENS=(MDY) in INREC BUILD to get the mmddyy date more easily (I don't know why I didn't do that for the earlier job).
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
You can replace MMDDYY anywhere in your records quite easily now with DFSORT's new FINDREP function available with z/OS DFSORT V1R5 PTF UK90013 (July, 2008) like this: