All CA IDMS database files are mapped to physical datasets, either in the DMCL or through the startup JCL for the CV.
How can I change the High-Level Qualifier (HLQ) of all the datasets in the CV?
This applies to all environments where an IDMS CV is present.
There are a couple of things to consider here. First, the dataset names (DSNs) can be specified in the DMCL and/or in the startup JCL. Before doing a lot of work to change the names in the DMCL, first check it to see if it contains dataset names for the files. You can do this by getting to your live CV and issuing the command 'LOOK DMCL' This will give you a display of 3 main parts:
1- general information first;
2- then the areas, listed alphabetically by segment name;
3- then the files, listed alphabetically by segment name.
The 3rd part (the file listings) is what you want to inspect. It will look something like this in DCMT D FILE:
File Name DDNAME Type Cache Cache Buffer Name
-------------------- -------- ---- ----- ---- ------------------
APPLDICT.DICTDB DICTDB BDAM No No DEFAULT_BUFFER
DSname: (DMCL) MEN.C5100.PHILESP.APPLDICT.DDLDML
APPLDICT.DLODDB DLODDB BDAM No No DEFAULT_BUFFER
DSname: (DMCL) MEN.C5100.PHILESP.APPLDICT.DDLDCLOD
ASFDICT.ASFDATA ASFDATA BDAM No No DEFAULT_BUFFER
DSname: (DMCL) MEN.C5100.PHILESP.ASFDICT.ASFDATA
In these sample lines, you see that there are several files where the DSname info indicates (DMCL) followed by a name. If you see lines like this, then you will have to modify the DSnames in the DMCL. If the literal "DSname" in these lines is followed by spaces, then the DSname for the file is not specified in the DMCL and you do not have to alter it.
If you do need to alter the files that are referenced in the DMCL, it is a multi-step process. Here are the steps:
1- Run an IDMSBCF job. A sample of the JCL for this job can be found in the CA IDMS Common Facilities Guide, in the Chapter titled "Batch Processing” in a section called "JCL for Z/OS". In your JCL, point the SYSLST DDname to a pre-defined physical dataset with these characteristics:
? RECFM = FB
? LRECL = 133
? BLKSIZE = 133*n
2- Use the following statements as input in your IDMSBCF job:
CONNECT TO SYSTEM;
*+ Status = 0 SQLSTATE = 00000
SELECT 'DISPLAY FILE ', TRIM(F.SEGMENT)||'.'||TRIM(F.NAME),
'AS SYNTAX VERB ALTER ;'
FROM SYSTEM.FILE F
WHERE F.DSNAME IS NOT NULL
AND (TRIM(F.SEGMENT)||TRIM(F.NAME)) IN
FROM SYSTEM.DMCLFILE DF WHERE DF.DMCL = '<your DMCL name>') ;
This will produce output that looks like this in the file you specified in the SYSLST DDname:
*+ (CONST) (EXPR) (CONST)
*+ ------- ------ -------
*+ DISPLAY FILE BCBALSCH.BCB-ARTALB-FILE AS SYNTAX VERB ALTER ;
*+ DISPLAY FILE BCBALSCH.BCB-MUSIC-FILE AS SYNTAX VERB ALTER ;
*+ DISPLAY FILE BCBALSCH.BCB-NDX-FILE1 AS SYNTAX VERB ALTER ;
*+ DISPLAY FILE BCBALSCH.BCB-NDX-FILE2 AS SYNTAX VERB ALTER ;
*+ DISPLAY FILE BCBALSCH.BCB-NDX-FILE3 AS SYNTAX VERB ALTER ;
*+ DISPLAY FILE BCBALSCH.BCB-NDX-FILE4 AS SYNTAX VERB ALTER ;
You will see one line for each file that specifies a DSName and that is included in your DMCL.
The second step in this process is to modify the lines above. You can do this by simply eliminating the "*+" at the beginning of each line, either by deleting them manually, or by using a global change command to convert them to spaces. Once that change is made, insert one line at the very top of this dataset (above all of the lines that read "DISPLAY FILE...". On that line, type in the command "CONNECT TO SYSTEM;" so that this is the first command to be processed.
The third step will be to run another IDMSBCF job. This time, your input will be the dataset you just altered, so you will change the JCL so that instead of reading
//SYSIPT DD *
Statements (including optional SET OPTIONS statements)
it will read
//SYSIPT DD DSN=<your working file name>,DISP=SHR
Also change your IDMSBCF JCL to specify a different output file in the SYSLST DD statement, so this job will not try to overwrite the file you are now using as input.
Your output will be one statement similar to this for each file where the DSname needs to be changed:
*+ CREATED 2008-10-14-188.8.131.528746 BY BREBR01
*+ LAST CRITICAL CHANGE 2008-10-14-184.108.40.2060810
ASSIGN TO BCBARTAL
*+ FILE BLOCK SIZE 15476 CHARACTERS
You can clearly see the DSname in this ALTER statement.
The fourth step is to use TSO or another tool to do a universal change to the HLQ in the Dataset name. Verify before or after doing so that the HLQ does not appear in where else in your syntax. After the change, verify that only the HLQs have been changed, and that they now read the way you desire. Save the changes to this dataset.
Your fourth step is to run another IDMSBCF job where you point the SYSIN to the dataset you just modified. This time you can point the SYSLST to DD *.
After that job has been run, check for any errors. If there are none, then you can proceed.
The final step in this process will be to re-generate the DMCL so that it pulls in the changed names. You can do this by using OCF online, or another IDMSBCF job, to execute the command
GENERATE DMCL <your DMCL-name> ;
Once the above steps are all complete, your DMCL should now contain the changed dataset names.
As with any DMCL changes, once the above is all complete you will have to punch the DMCL load module and link-edit it. Details about how to do this are in the CA IDMS Database Administrator Guide, in a section called "Making the DMCL Accessible to the Runtime Environment".
In addition to all of the above, you will need to do two things:
1- check your run-time JCL that brings up your IDMS CV. Change any of the dataset names in tat JCL to specify the new HLQ;
2- Change the names of the actual datasets themselves.
Once these steps are complete you should be able to bring up the CV and it will reference the datasets by the names with the new HLQs.
Full documentation on managing the DMCL can be found in the CA IDMS Database Administration Guide.