Operational Control Language

Last updated

Operational Control Language (OCL) is the control language of the IBM System/3, System/32, System/34 and System/36 minicomputer family. It is supported on IBM i's System/36 Environment for backwards compatibility purposes. It is similar to the older control languages JCL (System/370), and unrelated to the later Control Language (System/38 and IBM AS/400), and REXX (AS/400).

Contents

Overview

OCL statements are used to directly load user or system programs into memory, assign system resources to them, and transfer system control to them in a process called execution. The fact that a program is stored on a computer's disk drive does not in itself cause the computer to process or execute the program.

OCL statements can be entered manually from the keyboard, but are generally stored as a procedure member. A procedure member is a freely editable member within a library, it is a source file. On the S/32, S/34, and S/36, procedures are not compiled, they are interpreted.

Example

OCL statements usually begin with two slashes and at least one space character. Here's an example of a procedure stored on a System/36 as member PROC1:

** Procedure PROC1                  Optional documentation **  ** Written by Joe User 2006-05-29 ** **  // * 'PROC1 procedure is running' // * ' ' // IFF ACTIVE-'PROC2,PROC3' GOTO OKAY **                                  IFF means 'if false' **                                  ACTIVE-'name1,name2' means true **                                  if at least one of the listed programs is currently running **                                  GOTO xxx means skip to the statement **                                  that has a TAG xxx and resume processing // PAUSE 'Cannot continue because other Payroll is running' **                                  Halts execution with a message // CANCEL                           Stops execution of this procedure // TAG OKAY // IFF DATAF1-PFILE1 IFF DATAF1-PFILE2 GOTO NODELT // * 'Caution, Pay Data Exists'     Displays information on terminal // * ' ' // * 'Press 1 to continue and DELETE existing files' // IFF '1'=?1R? CANCEL              A parameter is indicated by question marks surrounding a number **                                  Using 1R between question marks indicates **                                  that the parameter is required **                                  and processing waits for user input.   **                                  CANCEL means immediately go to end of job. // LOAD $DELET                      $DELET is used to delete files // RUN **                                  This program requires and processes, consumes, **                                  succeeding statements as data up until an END statement  // IF DATAF1-PFILE1 SCRATCH UNIT-F1,LABEL-PFILE1 **                                  Conditionally deletes an existing disk file // IF DATAF1-PFILE2 SCRATCH UNIT-F1,LABEL-PFILE2 // END ** // TAG NODELT // LOAD PR101                       PR101 could be an RPG or COBOL program // FILE NAME-PAYMAST,DISP-SHR       PAYMAST is the payroll master file // FILE NAME-PFILE1,DISP-NEW,RECORDS-100,EXTEND-100 **                                  A new file PFILE1 is created and allocated **                                  100 records are assigned to PFILE1 **                                  when all are used, the system tries to extend it by another 100 **                                  each time it fills. // RUN **                                  END statement is only necessary **                                  for those programs enabled **                                  to process any following statements as data **                                  Such data does not need to be formatted like OCL // SWITCH 1XX0XXXX                  Causes flags U1 through U8 to be SETON (1), OFF (0), or left as previously set (X) ** // LOCAL OFFSET-1,DATA-'PROC1'      Places PROC1 in the Local Data Area (LDA) // LOCAL OFFSET-101,DATA-'?USER?'   Substitutes the operator's User ID                         **                                  LDA is accessed via a data structure, UDS within an RPG program **                                  LDA and User switches (flags) remain available to succeeding programs **                                  until set otherwise **                                  Called sub-procedure members and loaded program's source code needs to be examined **                                  as to whether or not the LDA and User switches are actually read or altered // LOAD PR102 // FILE NAME-PAYMAST,DISP-SHR       DISP-SHR means the file is shared, versus exclusive access **                                  Other programs can use PAYMAST at the same time // FILE NAME-PFILE,LABEL-PFILE1     NAME/LABEL is used when the RPG file name reference **                                  and the actual disk file label are different // RUN // RETURN                           Return to the calling procedure, otherwise end-of-job 

This procedure member incorporates a variety of OCL statements, also procedure control expressions (PCE), resources, that is mostly files are allocated, and several job steps, that is programs are executed.

Comments are represented by an asterisk in column 1, and otherwise free-format. Or can be placed after the logical end of a statement, if there is no indicator for statement continuation onto the next line, like a trailing comma.

IBM maintains manuals freely online and downloadable, including OCL 36.

Related Research Articles

<span class="mw-page-title-main">MVS</span> Operating system for IBM mainframes

Multiple Virtual Storage, more commonly called MVS, is the most commonly used operating system on the System/370, System/390 and IBM Z IBM mainframe computers. IBM developed MVS, along with OS/VS1 and SVS, as a successor to OS/360. It is unrelated to IBM's other mainframe operating system lines, e.g., VSE, VM, TPF.

<span class="mw-page-title-main">IBM System/34</span> IBM midrange computer (1977–1985)

The IBM System/34 was an IBM midrange computer introduced in 1977. It was withdrawn from marketing in February 1985. It was a multi-user, multi-tasking successor to the single-user System/32. It included two processors, one based on the System/32 and the second based on the System/3. Like the System/32 and the System/3, the System/34 was primarily programmed in the RPG II language.

<span class="mw-page-title-main">IBM System/36</span> IBM midrange computer (1983–2000)

The IBM System/36 was a midrange computer marketed by IBM from 1983 to 2000 - a multi-user, multi-tasking successor to the System/34.

Transact-SQL (T-SQL) is Microsoft's and Sybase's proprietary extension to the SQL used to interact with relational databases. T-SQL expands on the SQL standard to include procedural programming, local variables, various support functions for string processing, date processing, mathematics, etc. and changes to the DELETE and UPDATE statements.

Job Control Language (JCL) is a name for scripting languages used on IBM mainframe operating systems to instruct the system on how to run a batch job or start a subsystem. The purpose of JCL is to say which programs to run, using which files or devices for input or output, and at times to also indicate under what conditions to skip a step. Parameters in the JCL can also provide accounting information for tracking the resources used by a job as well as which machine the job should run on.

<span class="mw-page-title-main">IBM 1130</span> 16-bit IBM minicomputer introduced in 1965

The IBM 1130 Computing System, introduced in 1965, was IBM's least expensive computer at that time. A binary 16-bit machine, it was marketed to price-sensitive, computing-intensive technical markets, like education and engineering, succeeding the decimal IBM 1620 in that market segment. Typical installations included a 1 megabyte disk drive that stored the operating system, compilers and object programs, with program source generated and maintained on punched cards. Fortran was the most common programming language used, but several others, including APL, were available.

<span class="mw-page-title-main">IBM System/32</span> IBM midrange computer (1975–1984)

The IBM System/32 introduced in January 1975 was a midrange computer with built-in display screen, disk drives, printer, and database report software. It was used primarily by small to midsize businesses for accounting applications. RPG II was the primary programming language for the machine.

RPG is a high-level programming language for business applications, introduced in 1959 for the IBM 1401. It is most well known as the primary programming language of IBM's midrange computer product line, including the IBM i operating system. RPG has traditionally featured a number of distinctive concepts, such as the program cycle, and the column-oriented syntax. The most recent version is RPG IV, which includes a number of modernization features, including free-form syntax.

<span class="mw-page-title-main">IBM System/3</span> IBM midrange computer (1969–1985)

The IBM System/3 was an IBM midrange computer introduced in 1969, and marketed until 1985. It was produced by IBM Rochester in Minnesota as a low-end business computer aimed at smaller organizations that still used IBM 1400 series computers or unit record equipment. The first member of what IBM refers to as their "midrange" line, it also introduced the RPG II programming language. It is the first ancestor in the product line whose current version is the IBM i series and includes the highly successful AS/400.

IEFBR14 is an IBM mainframe utility program. It runs in all IBM mainframe environments derived from OS/360, including z/OS. It is a placeholder that returns the exit status zero, similar to the true command on UNIX-like systems.

This article discusses support programs included in or available for OS/360 and successors. IBM categorizes some of these programs as utilities and others as service aids; the boundaries are not always consistent or obvious. Many, but not all, of these programs match the types in utility software.

<span class="mw-page-title-main">IBM Displaywriter System</span>

The IBM 6580 Displaywriter System is a 16-bit microcomputer that was marketed and sold by IBM's Office Products Division primarily as a word processor. Announced in June 1980 and effectively withdrawn from marketing in July 1986, the system was sold with a 5 MHz Intel 8086, 128K to 448K of RAM, a swivel-mounted monochrome CRT monitor, a detached keyboard, a detached 8" floppy disk drive enclosure with one or two drives, and a detached daisy wheel printer, or Selectric typewriter printer. The primary operating system for the Displaywriter is IBM's internally developed word processing software titled "Textpack", but UCSD p-System, CP/M-86 and MS-DOS were also offered by IBM, Digital Research and CompuSystems, respectively.

<span class="mw-page-title-main">System Support Program</span> Operating system for IBM minicomputers

System Support Program (SSP) was the operating system of the IBM System/34 and System/36 minicomputers. SSP was a command-based operating system released in 1977.

IBM System/34 BASIC was an interpreter for the IBM System/34 midrange computer.

IBM System/36 BASIC was an interpreter for the IBM System/36 midrange computer.

CMS EXEC, or EXEC, is an interpreted, command procedure control, computer scripting language used by the CMS EXEC Processor supplied with the IBM Virtual Machine/Conversational Monitor System (VM/CMS) operating system.

EXEC 2 is an interpreted, command procedure control, computer scripting language used by the EXEC 2 Processor originally supplied with the CMS component of the IBM Virtual Machine/System Product (VM/SP) operating system.

In IBM mainframe operating systems, basic partitioned access method (BPAM) is an access method for libraries, called partitioned datasets (PDSes) in IBM terminology. BPAM is used in OS/360, OS/VS2, MVS, z/OS, and others.

TERSE is an IBM archive file format that supports lossless compression. A TERSE file may contain a sequential data set, a partitioned data set (PDS), partitioned data set extended (PDSE), or a large format dataset (DSNTYPE=LARGE). Any record format (RECFM) is allowed as long as the record length is less than 32 K. Records may contain printer control characters.