-----------------------------------------------------------------------
JESYSMSG
STMT NO. MESSAGE
4 IEFC627I INCORRECT USE OF AMPERSAND IN THE DSN FIELD
******************************* BOTTOM OF DATA **************
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
Hello Anuj ,
These are most likly not the answers you would prefer, but please consider them.
From my experience, putting "today's-date" in the dataset name is not a good practice. Although it "is not supposed to happen", everywhere i've been found themselves in the situation that the job had to run for a second time that "day". This lead to some extra work just to be able to submit the job. If the dataset was defined as a gdg, there would be no issue of trying to "get the date" into the dsn. It also makes the problem of a second run go away. If you want the file from "yesterday" you need only specify (-1) not come up with the actual date and plug it into some jcl.
If you must include the date in the dsn, one easy way is to write a little program that creates either the run jcl or a proc execution "on the fly", inserting the date in the dsn or as a parm as appropriate. This program would write the created jcl to the internal reader and end. The real job would then run with the current date "available".