Browse Prior Art Database

System And Method For Conditional Logic In Utility Input Statements

IP.com Disclosure Number: IPCOM000207651D
Publication Date: 2011-Jun-08
Document File: 5 page(s) / 85K

Publishing Venue

The IP.com Prior Art Database

Abstract

Disclosed is a system and method for conditional logic in utility input statements. The invention presents a design for a System Input (SYSIN) statement processor that takes advantage of similarities in programming languages, providing the means for building a SYSIN statement processor that utilizes the powerful language processor of the z/OS* system. The advantage is that the logic and grouping processing is performed by existing system components, while the utility statements are processed by components of the utility.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 33% of the total text.

Page 01 of 5

System And Method For Conditional Logic In Utility Input Statements

Many z/OS* batch utilities have input statements provided in an input file to be processed. Typically, the statements are executed serially until the list of statements is exhausted. There are times when the user wants to process one statement and, if it is successful, then process a follow-up statement or group of statements.

Writing a utility program that supports condition statements can become complicated

when multiple conditions need to be supported and when nested groupings are

supported. Usually, the main design effort is in processing the utility statements themselves. For that reason, many utilities do not provide support for conditional logic statements. When it is attempted, the effort can be overwhelming; it is almost like

writing a compiler.

z/OS batch utilities process the statements that are contained in an input file. The statements are processed serially. It is sometimes desirable to process statements based on the outcome of the prior statement. It is also desirable to group some of the statements.

The use of the IF / THEN statement and the DO / END grouping delimiters is a style that is already in use in some z/OS utilities; thus, z/OS users are familiar with this style. The conversion process described can be customized for other syntax styles.

Figure 1: System Input (SYSIN) file with statements

//SYSIN DD *

SET MAXCC = 4

CREATE WIDGIT NAME(TEST1) INCLUDE(DB001,DB003)

IF LASTCC = 0 THEN

DO

QUERY WIDGIT NAME(TEST1)

QUERY WIDGIT NAME(GROUP2)

END
/*

The SYSIN statements in Figure 1, aside from some application specific statements, have some syntax similar to a programming language. The sample input statements have the following in common with programming languages:


Assign values to variables

• Logic based on conditions
• Grouping of statements

The SYSIN statements can be considered a special purpose programming language.

The disclosed invention takes advantage of similarities in programming languages, providing the means for building a SYSIN statement processor that utilizes the powerful language processor that is included with the z/OS system. The advantage is that the

1


Page 02 of 5

logic and grouping processing is performed by existing system components,

utility statements are processed by components of the utility.

The Restructured Extended Executor (REXX) language is powerful and has a rich set of functions which includes support for both conditional logic and the grouping of statements. The z/OS system includes a REXX processor. The REXX processor can be utilized to process the utility SYSIN statements if those statements are translated into a format that the REXX processor understands and with additional routines for setup and processing.

The following is a description of the translation and setup required by the utility in order to support SYSIN statements that include conditional logic statements.

The internal steps of the conversio...