Routine for Issuing MVS Console Commands in Batch or by Other Programs
Original Publication Date: 2002-Sep-15
Included in the Prior Art Database: 2003-Jun-19
A program is disclosed that allows MVS console commands to be issued in batch by calling the said problem directly in Job Control Language (JCL) or via linking to the program via another calling program. When designing test cases for use in a system test environment, it is highly desirable to have such test cases as automated as possible. This allows many testcases to be submitted in a batch workload with no operator intervention, which has further value in that the tester can do other tasks, such as reviewing testcase return codes, etc. and not have to monitor a console to do manual tasks related to the testing being done. A common problem that testcase designers and programmers run into is how to simply include automation of Multiple Virstual Storage (MVS) operating system console commands in the implementation of batch stream workloads. One solution is to use an automation product (such as IBM System Automation for OS/390) to trap on conditions such as messages and issue an appropriate command or issue a specified command on a time bases. Another solution would be to eliminate the need for manual intervention from the console. Solution 1 is cumbersome, to say the least, and solution 2 is not practical. Another solution is to exploit the supervisor call MGCRE that issues commands via an Extended Master Console (EMCS) obtained via the MCSOPER supervisor call. See Exhibit 1. The routine takes a command passed to it as a parameter, switches to supervisor state, issue the MCSOPER macro to obtain the EMCS console, issue the MGCRE macro to issue a command using the obtained EMCS console, then switches back to problem state. The routine can either be called as a separate program as shown in exhibit 2 (by coding EXEC PGM=CONCMD,PARM='command to issue') or by calling the routine from another program (standard program linkage is used). The routine is known as CONCMD.