28.11.2012 Views

IBM Tivoli NetView for z/OS Programming: Pipes - IBM notice

IBM Tivoli NetView for z/OS Programming: Pipes - IBM notice

IBM Tivoli NetView for z/OS Programming: Pipes - IBM notice

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Examples<br />

−0000000023<br />

Indicates that an internal error during set user's supplementary<br />

groups (setgroups) processing caused UNIX command processing<br />

to terminate.<br />

−0000000025<br />

Indicates that an error return code was returned as a result of<br />

invoking the SIGACTION system service.<br />

Example: List the Current Working Directory<br />

The following code changes to the current working directory to /usr/lpp and then<br />

lists the contents of that directory. The directory listing is displayed in green<br />

followed by the response code displayed in yellow.<br />

NetVAsIs PIPE (END +)<br />

A: UNIX cd /usr/lpp; ls -al<br />

| WAIT 19<br />

| COLOR GREEN<br />

| CONSOLE ONLY+<br />

A: | COLOR YELLOW<br />

| CONSOLE ONLY<br />

Example: Execute Commands Contained In DSIPARM<br />

The following code sends the UNIX script file contained in DSIPARM member LW<br />

to UNIX <strong>for</strong> execution. The command results are displayed in green followed by<br />

the UNIX response code displayed in yellow.<br />

NetVAsIs PIPE (END +)<br />

< DSIPARM.LW<br />

| COLLECT<br />

| A: UNIX cat > script.cmd; chmod 777<br />

script.cmd;./script.cmd<br />

| WAIT 19<br />

| COLOR GREEN<br />

| CONSOLE ONLY+<br />

A: | COLOR YELLOW<br />

| CONSOLE ONLY<br />

Example: Compile and Execute a Java Sample<br />

The following code sends the Java sample HelloWorld from the <strong>NetView</strong> data set<br />

to UNIX where it is compiled and executed. The results are returned to the<br />

invoker. Results are displayed in green followed by the UNIX response code<br />

displayed in yellow.<br />

For simplicity, the example is broken into three separate operations:<br />

1. Send the source code to UNIX:<br />

NetVAsIs PIPE (END ;)<br />

< CNMJSHW<br />

| STRIP TRAILING<br />

| COLLECT<br />

| A: UNIX cat > HelloWorld.java<br />

| WAIT 99<br />

| COLOR GREEN<br />

| CONSOLE ONLY;<br />

A: | COLOR YELLOW<br />

| CONSOLE ONLY<br />

2. Compile the HelloWorld Java source program:<br />

PIPE UNIX<br />

Chapter 2. Pipeline Stages and Syntax 249

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!