Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Macro name changed from html to html-bobswift during server to cloud migration processing.

...

Anchor
1050342
1050342
The CL source files are compiled and bound with the following command:


Panel

...

Html bobswift
<pre>
CRTBNDCL PGM(UNVPRD511/exitname)
               SRCFILE(UNVPRD511/UNVCLSRC)
               SRCMBR(exitname)
</pre>

Anchor
1050360
1050360
Change the exitname to the name of the exit to be compiled and bound.

Anchor
1050361
1050361
UCMSJOBI

Anchor
1050362
1050362
The UCMSJOBI exit is called before any user command is executed. This exit can be used to customize the job's environment to meet local requirements. It executes under the user profile requested by the Manager. If the exit issues unhandled messages with a severity greater than or equal to the value of the UCMD Server END_SEVERITY option, the job will terminate without executing any user commands.

...

Anchor
1050388
1050388
For example, the following command sends the text "'Change current library to ABC" to standard output and changes the current library:

Panel

...

Html bobswift
<pre>
ucmd -c "say 'Change current library to ABC'; \"CHGCURLIB CURLIB(ABC) \"" -i as400 -u qsysopr -w qsysopr -cmd_type rexx
</pre>

Anchor
1050390
1050390
A user may use a simple REXX program in this context to setup and execute programs on the IBM i.

Anchor
1050391
1050391
REXX provides the benefit of using standard output (STDOUT) and standard input (STDIN) files as part of their environment. The SAY command writes to STDOUT and the PULL command reads from STDIN.

...

Anchor
1051187
1051187
For example, the following line is sufficient to indicate a REXX EXEC file:

Panel
Html bobswift
<pre>
/* REXX */
</pre>

Anchor
1050407
1050407
REXX EXECs have the benefit of using standard output (STDOUT) and standard input (STDIN) files as part of their environment. The SAY command writes to STDOUT and the PULL command reads from STDIN.

...

Anchor
1051217
1051217
For example, the following UCMD Manager command can be used from Windows or UNIX to request execution of the command reference cref100 and pass it options opt1 and opt2:

Panel

...

Html bobswift
<pre>
ucmd -c "cref100 opt1,opt2" -cmd_type cmdref ...
</pre>

Anchor
1050418
1050418
IBM i command references can define command types cmd and rexx.

Anchor
1058186
1058186
For a complete discussion of Command References, see Command References.

...

Anchor
1054350
1054350
To use this cmdref, invoke UCMD Manager using:

...

Panel

<eof>

...

Anchor10504531050453

Panel
Html bobswift
<pre>
ucmd -c "cmdref_cmd" -cmd_type cmdref -u xxxx -w zzzz -i as400
</pre>

Anchor
1050424
1050424
In this case, the user (xxxx) has authority to call the IBM i system object QWCRJBST and cmdref_cmd is the name of the command reference file on the IBM i.


Panel
Html bobswift
<pre>
# -- File named cmdref_cmd in library UNVCMDREF --
# Use USBMJOB to execute the DSPLIB command.
#
-format cmd
-type cmd
</pre>

<eof>

Html bobswift
<pre>
usbmjob cmd(dsplib qsysopr)
</pre>


Anchor
1054331
1054331
The next command reference contains a series of four commands which are executed in sequence from top to bottom.

Anchor
1054367
1054367
Invoke these commands from system as4test using:

Panel
Html bobswift
<pre>
ucmd -c "cref_test" -cmd_type cmdref -u xxxx -w zzzz -i as4test
</pre>

Anchor
1050453
1050453
In this case, the user (xxxx) has authority to call the IBM i system object QWCRJBST and cref_test is the name of the command reference file on the IBM i.


Panel
Html bobswift
<pre>
# -- File named cref_test in library UCVCMDREF --
# Execute a series of commands.  The output of the first two will remain
# on the output queue associated with the job's printer.  The output of
# the second two (by means of USBMJOB) will be directed to standard output
# and sent to the system running the Universal Command Manager.
#
-format script
-type cmd
</pre>

<eof>

Html bobswift
<pre>

DSPUSRPRF USRPRF(QUSER)
dspcurdir
usbmjob cmd(dsplib quser)
usbmjob cmd(dsplibl)
</pre>

Anchor
1050481
1050481
REXX Command Reference Example

Anchor
1050482
1050482
The following command reference sends the message and the library catalog to standard output. The job logs are sent to standard error.

Anchor
1051341
1051341
To invoke this cmdref on system denver, use:

Panel
Html bobswift
<pre>
ucmd -c "rexx_test" -cmd_type cmdref -u xxxx -w zzzz -i denver
</pre>

Anchor
1050484
1050484
In this case, the user (xxxx) has authority to call the IBM i system object QWCRJBST and crefrexx_test is the name of the command reference file on the IBM i.

Panel

<eof>

...

command reference file on the IBM i.

Anchor
1050485
1050485
Once again, the user, designated by the -u option, requires access to the object QWCRJBST. Without this access, usbmjob will fail.


Panel
Html bobswift
<pre>
# -- File named rexx_test in library UCVCMDREF --
# Use USBMJOB to execute the DSPLIB command.
#
-format script
-type rexx
</pre>

<eof>

Html bobswift
<pre>
say "Submitting job to display library qsysopr"
'usbmjob cmd(dsplib qsysopr)'
</pre>