Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Since the LANSA export/import facilities support the transfer of non-LANSA objects between systems, a method by which user-defined IBM i IBM i operating system commands can be executed as part of the import job is also required.

...

Remember that any command can also contain substitution variables. The method of defining the use of substitution variables in export lists is described in Define Substitution Variables Used in a List.

When substitution variables are actually replaced in a command just prior to execution, trailing blanks in the substitution value are stripped off. For example, if a command used a substitution variable called $$PGMLIB$$, and a command defined to execute before import looked like this:

     DLTPGM PGM($$PGMLIB$$/TESTPGM)

and at execution time variable $$PGMLIB$$ contained 'QGPL', then the command actually executed would look like this:

     DLTPGM PGM(QGPL/TESTPGM)

Similarly, a command to be executed may actually be expanded if the substitution variable's value is actually longer than the space used by the substitution variable within the command string. For example, consider the command:

     SNDMSG MSG('$$USRMSG$$') TOMSGQ($$MSGQUE$$)

If at execution time $$USRMSG$$ contained 'HELLO THERE, HOW ARE YOU' and $$MSGQUE$$ contained 'WS1', then the actual command executed would be:

     SNDMSG MSG('HELLO THERE, HOW ARE YOU') TOMSGQ(WS1)