Quantcast
Channel: IBM Mainframe Computers Forums
Viewing all articles
Browse latest Browse all 8500

CLIST & REXX :: RE: Invoking CA 7 commands through REXX

$
0
0
Author: Robert Sample
Subject: Reply to: Invoking CA 7 commands through REXX
Posted: Fri Aug 12, 2016 9:45 pm (GMT 5.5)

I Googled ca-7 rexx and got back about 77,800 hits and the very first one was titled CA7MVS - Sample CA-7 Interface Routine. This page says:
Quote:
CA7MVS -- Sample CA 7 Interface Routine

Last update October 31, 2014




Contents



•CA7MVS Implementation
•CA7MVS Customization Variables


The routine CA7MVS in the REXX library (data set SYS1.OPS.CCLXEXEC) is an OPS/REXX program that issues CA 7 commands and gets responses returned in the external data queue of the calling program.

•This syntax issues the CA 7 LACT command:

CALL CA7MVS 'LACT|EXECUTE'

◦Vertical bar |

The default command separator. Editing the CA7MVS separator parameter can modify the default command separator.
◦EXECUTE command

The equivalent of pressing the Enter key. A simple DO WHILE QUEUED() loop can process the returned response lines.


•To enter data on a multiple field screen, you can input using the split vertical bar.

For example, This syntax places the command PF in the first (top) input field, the command I20 in the second input field, and then presses the Enter key (EXECUTE command):

CALL CA7MVS 'PF|I20|EXECUTE'



•You can make multiple calls to CA7MVS and cause input to be stacked until you call CA7MVS with the EXECUTE command. The previous example could have been written:

CALL CA7MVS 'PF'
CALL CA7MVS 'I20'
CALL CA7MVS 'EXECUTE'


or

CALL CA7MVS 'PF|I20'
CALL CA7MVS 'EXECUTE'


or

CALL CA7MVS 'PF'
CALL CA7MVS 'I20|EXECUTE'



By default, EXECUTE presses the Enter key, which can be overridden by specifying a PF key or other attention key (PF1, ..., PF24, PA1, PA2, PA3, CLEAR, or Enter). For example:

CALL CA7MVS 'EXECUTE CLEAR'
CALL CA7MVS 'LACT|EXECUTE ENTER'


CA7MVS Implementation

The CA7MVS REXX program uses the ADDRESS EPI environment to define a virtual terminal, enable it, and log it on to CA 7. When a user wants to execute a sequence of input commands, they are stacked in global variables (uniquely named for each address space) until an EXECUTE command is encountered.

The CA 7 virtual terminal is then enqueued on exclusively, and the input data is entered onto the screen. Responses are scrolled through to retrieve all output and are placed in the REXX external data queue. The virtual terminal is dequeued after completion.

The CA7MVS program handles scrollable output such as that from LACT, LPRRN, LJOB, and most other list commands (Lxxx) in a special way, as follows:
•All blank lines are removed.
•Page number lines are removed.
•Duplicate column header lines are removed from page 2 and all subsequent pages.

This causes the returned output to start with a single set of column header lines, followed by detail data lines without intervening headers or blank lines, followed optionally by a command completion line from CA 7.

The intended use for the CA7MVS is primarily for command/response type applications, where a single command is used to inquire CA 7 (non-interactive commands). Commands that invoke an interactive dialog (such as QJCL) can be issued through CA7MVS, but will leave the terminal unusable for other callers of CA7MVS in that case.

The CA7MVS program does allow multiple users to issue non-interactive commands using a single CA 7 virtual terminal. CA7MVS takes care of the details of sharing the virtual terminal in such case.
Perhaps, rather than posting on a forum, you should go to the CA support web site (which you have access to if your site pays for CA-7) and see what documentation CA provides?
_________________
TANSTAAFL

The first rule of code reuse is that the code needs to be worth re-using.

"We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil." -- Donald Knuth


Viewing all articles
Browse latest Browse all 8500

Trending Articles