IBM Support

Importing System Distribution Directory Entries

Troubleshooting


Problem

This document explains how you can import SDD entries from a physical file.

Resolving The Problem

Suppose that you are in the middle of a system migration. One of the migration tasks is to copy the current SDD entries to the new system.

For example, assume the following as the involved systems IDs in the migration:

Old system: S101710R
New system: S1016628

Caution: The example CL code provided is not supported and is provided only on an as is basis.

To import SDD entries from a physical file, do the following:
1.Sign-on to the old system.
2.On the operating system command line type the following commands to save the SDD entries:

DSPDIRE OUTPUT(*OUTFILE) OUTFILE(QGPL/SDDENTRIES) DETAIL(*FULL)

Press the Enter key.

CRTSAVF FILE(QGPL/SDDSAVF)

Press the Enter key.

SAVOBJ OBJ(SDDENTRIES) LIB(QGPL) DEV(*SAVF) SAVF(QGPL/SDDSAVF) DTACPR(*YES)

Press the Enter key.
3.Send the save file SDDSAVF to the new system and run the following command on the operating system command line to restore the SDD entries' file:

RSTOBJ OBJ(SDDENTRIES) SAVLIB(QGPL) DEV(*SAVF) SAVF(QGPL/SDDSAVF)

Press the Enter key.
4.Copy the following CL code into a source member (for example, QGPL/QCLSRC.IMPORTSDD). Then, compile it to create a CL procedure:

BEGIN:      PGM        PARM(&OLDSYSNAME)
            DCLF       FILE(SDDENTRIES)
            DCL        VAR(&SYSNAME) TYPE(*CHAR) LEN(8)
            DCL        VAR(&OLDSYSNAME) TYPE(*CHAR) LEN(8)
/* */
            IF         COND(&OLDSYSNAME = ' ') THEN(GOTO CMDLBL(END))
/* */
            RTVNETA    SYSNAME(&SYSNAME)
/* */
IMPORT:     RCVF
            MONMSG     MSGID(CPF0864) EXEC(GOTO CMDLBL(END))
            IF         COND(&WOSDUSRP *EQ ' ') THEN(DO)
            ADDDIRE    USRID(&WOSDDEN &WOSDDGN) USRD(&WOSDDESC) +
                         USER(*NONE) SYSNAME(&WOSDREN &WOSDRGN)
            MONMSG     MSGID(CPF0000)
            ENDDO
            IF         COND(&WOSDUSRP *NE ' ') THEN(DO)
            IF         COND(&WOSDREN = &OLDSYSNAME) THEN(CHGVAR +
                         VAR(&WOSDREN) VALUE(&SYSNAME))
            CHKOBJ     OBJ(&WOSDUSRP) OBJTYPE(*USRPRF)
            MONMSG     MSGID(CPF9801) EXEC(GOTO CMDLBL(IMPORT))
            ADDDIRE    USRID(&WOSDDEN &WOSDREN) USRD(&WOSDDESC) +
                         USER(&WOSDUSRP)
            MONMSG     MSGID(CPF0000)
            ENDDO
            GOTO       CMDLBL(IMPORT)
END:        ENDPGM
5.Run the above CL procedure to import the SDD entries into the new SDD of the system by calling the program from the operating system command line as follows:

CALL PGM(QGPL/IMPORTSDD) PARM('S101710R')

Press the Enter key.
Recommendation: The above CL procedure could be easily modified to fit your needs.

[{"Type":"MASTER","Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"Platform":[{"code":"PF012","label":"IBM i"}],"Version":"7.1.0"}]

Historical Number

404178729

Document Information

Modified date:
18 December 2019

UID

nas8N1015151