Examples: SBMRMTCMD command

The examples display different uses for the SBMRMTCMD command.

Example: Submit a command to create another DDM file on the remote server

SBMRMTCMD  CMD('CRTDDMF  FILE(SALES/MONTHLY)
   RMTFILE(*NONSTD ''SALES/CAR(JULY)'')
   RMTLOCNAME(DALLAS)')  DDMFILE(CHICAGO)

This submitted command creates, on the target server identified by the information in the DDM file named CHICAGO, another DDM file named MONTHLY; the new DDM file is stored in a library named SALES on the server defined by DDMFILE CHICAGO. The new DDM file on the CHICAGO server is used to access a file and member on a different server named DALLAS. The accessed file is named CAR in the library SALES and the member name in the file is JULY.

Notice that this CRTDDMF command string contains three sets of single quotation marks: one set to enclose the entire command being submitted (required by the CMD parameter on the SBMRMTCMD command), and a double set to enclose the file and member named in the RMTFILE parameter. Because the use of *NONSTD requires that nonstandard file names be enclosed in a set of single quotation marks, this second set of single quotation marks must be doubled because it is within the first set of single quotation marks.

Example: Submit a command to change text in a display file

SBMRMTCMD  CMD('CHGDSPF  FILE(LIBX/STANLEY)
   TEXT(''Don''''t forget to pair apostrophes.'')')
   DDMFILE(SMITH)

This command changes the text in the description of the display device file named STANLEY stored in library LIBX. Because the submitted command requires an outside set of single quotation marks (for the CMD parameter), each single quotation mark (') or quotation marks ('') normally required in the TEXT parameter for local server processing must be doubled again for remote server processing. The preceding coding produces a single quotation mark in the text when it is displayed or printed on the remote server.

Example: Submit a command to replace a library list on the remote server

SBMRMTCMD  CMD('CHGLIBL  LIBL(QGPL QTEMP SALES EVANS)')
   DDMFILE(EVANS)

This command changes the user's portion of the library list being used by the target job associated with the DDM file named EVANS, which is being used by the source job in which this SBMRMTCMD command is being submitted. In that source job, if there are other open DDM files that specify the remote location information, this library list is used for them also.