Versions Compared

Key

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

...

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


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

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

...

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

html-bobswift
Panel
<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
1051187
1051187
For example, the following line is sufficient to indicate a REXX EXEC file:

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

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:

html-bobswift
Panel
<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
1054350
1054350
To use this cmdref, invoke UCMD Manager using:

html-bobswift
Panel
<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.


<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>
Panel
Html bobswift


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:

html-bobswift
Panel
<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.


html-bobswift<pre>
DSPUSRPRF USRPRF(QUSER)
dspcurdir
usbmjob cmd(dsplib quser)
usbmjob cmd(dsplibl)
</pre>
Panel
<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

Anchor
1050481
1050481
REXX Command Reference Example

...

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

html-bobswift
Panel
<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 rexx_test is the name of the 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.


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

<eof>

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