I need to modify the dataset related to a ALIAS.
Since I did not found any "MODIFY"||"UPDATE"||"ALTER" command, I'm trying to delete a alias and then redefine it bellow as follows.
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DELETE <alias name> ALIAS
DEFINE ALIAS (NAME(<alias name>) -
This is working, but, if the ALIAS isn't created yet, it gives me a RC 8 on the deletion, which says that "ENTRY <aliasname> NOT FOUND".
Is there a way to test if the alias exists and then delete it only if it's true?
Or there is any better solution to do what I need to do? That is:
I'm recovering information that was migrated from DB2 to disk/tape through weekly PROC. The data to be recovered is separated by months and the dataset names follows this organization.
But the rules for the recovery (such as time frame, transaction type, values, etc) are stored on a DB2 table. In one week, we could have three months to recover and in the next week, none.
Since the datasets that are source to my recovery are not a constant, I need to make its names available to JCL. First, my solution was defining a dataset on a first JOB that was written from a cobol program with only one line that was:
and then include it on a second job. But here on my shop, include is not allowed.
Then I tryed the solution above with IDCAMS.
Thanks in advance and sorry by bad english.