Both return positions of data not existing in second variable Diff is in o/p. verify returns first char of x not in y. Index returns number of positions of y in x 3.what is control keyword in pli? Controlled is one of the storage classes. It can be used to allocate variable memory as and when it is used. 4.what are the the different types of string functions in pli? Strcp,strcmp,substr,translate,verify 5.how do you write from pli code to jcl? 6.what is the entry statement ?where we use; Entry structure/variables/procedures are defined in predefined libraries, these can be used in our app pgm by coding ENTRY stmt 7.where we use BASED? what is the purpose; based var is used for ADDressing memeory of the variable/structure. This is one of the types in pl1 to redefine the memory area. 8.default variable declaration? automatic 9.what is the use to declare variable as external? 10.write syntax to declare dynamic array? DCL abc(*) char(4); 11.what is the scope of the variable if it is inside the procedure? fixed 12.how to find a program as a static or dynamic? 13.what is subroutine? X n y are two pgms; x calls y; y executes and control passed back to x; 14.what is fetchable?why we use fetchable; 15.difference between call by name and call by reference? 16.how to include copybook? By using the %INCLUDE stmt 17.what is the different types of storage class? Auto/based/controlled/static 18.which proc execute when compile a pli program? Main 19.how do know it is pli? *PROCESS/Block structure 20.in options (main) , what is meaning of main . if u not used main what will happen? After compiling, os will not understand where to load and execute from 21.difference between steam i/o and record i/o? which one u will prefer and why? Stream i/o is for small amounts of data i.e., for getting info from sysin or so..; i/p data is not converted to upper case in stream i/o Record i/o: for larger data intake into app pgm/write to file in jcl. 22.In ON ERROR statement how to allow the system action? On error system
procedures within an MVS batch job. Cataloged procedures and their implementation at UTCC are discussed in chapter 12, with a particular discussion of cataloged procedures for programming languages beginning at section 12.3. In the present chapter, discussion of general programming languages on MVS includes reference to the cataloged procedures available in the UTCC procedure library and example batch jobs that demonstrate how to use the cataloged procedures to accomplish tasks such as compilation, linking, execution, etc. In the following examples, all user-owned libraries are presumed to be cataloged.
IBM Assembler
The IBM Assembler Language is based on a collection of mnemonic symbols which represent IBM machine language operations and auxiliary functions to be performed by a processing program. The Assembler Language is processed by an assembler program which translates the mnemonics into machine-language instructions, assigns storage, and performs other tasks which are necessary to produce an executable program. UTCC supports two assembler programs on the IBM computers: IBM Assembler H and the Pennsylvania State University Assembler System for Student Instruction and Systems Teaching (ASSIST). Assembler H Cataloged procedures Procedures available: ASMHC, ASMHCL, ASMHCLG, ASMHLG, ASMHL, ASMHCLD, ASMHLD
Symbolic Parameters ASMOPT, ASMREG GOPGM, LETGO, LKEDOPT, LKEDREG GOOPT, GOREG, LETGO, LOADOPT GOOPT, GOREG, LETGO
Examples
//jobname // /*ROUTE
` Assemble and link edit an Assembler program and place it as a member of a cataloged partitioned data set, Jprojcode.MYLIB.
//jobname // /*ROUTE
Documentation SC26-4036, Assembler H Version 2 Application Programming: Guide located in Remote 28 (Physics) GC26-4037, Assembler H Version 2 Application Programming: Language Reference and 28 ASSIST ASSIST, which features high-speed compilation, low overhead, extensive diagnostics, and batching facilities, is intended primarily for student course work in Assembler language programming. ASSIST provides several special pseudo-machine instructions which facilitate I/O. In case of abnormal termination, ASSIST provides a smaller but more meaningful completion dump than the ABEND dump produced by the operating system. In addition to register contents and user storage areas, the ASSIST completion dump includes bits 32-39 of the program status word and a list of the last ten instructions executed before abnormal termination occurred. ASSIST also provides a replacement capability which allows users to substitute their own versions of certain modules in the ASSIST assembler. Cataloged procedures
Procedures available:
ASSIST
Procedure
Step Name
Symbolic Parameters
Example
` Executing ASSIST
//jobname //
Documentation The following job produces the ASSIST User's Guide , U05-0082.
//stepname EXEC
IBM C
The IBM C programming language permits a programmer to deal with machine-level entities at a low level of control, while providing the high level of control and data structures associated with modern structured programming languages. Its key features are its small size relative to other languages, fast execution speed, flexibility in building applications, and the ease in which code can be transported from one computing environment to another. The C compilers on CMS and MVS are compatible, and programs and object modules developed on one system may be used on the other. The C compiler on MVS/ESA supports 31-bit addressing and parallel processing. The C/370 Multitasking Facility (MTF) allows a single C/370 program to use multiple processors simultaneously. Cataloged procedures
Procedures available: C370C, C370CLG, C370LD, C370CL, C370L, C370LG, C370CLD
Symbolic Parameters C370REG, C370OPT LKEDREG, LKEDOPT, LETGO, GOPGM LOADOPT, GOOPT, GOREG GOREG, GOOPT, LETGO, GOPGM
Examples
//jobname // /*ROUTE
//jobname // /*ROUTE
//stepname EXEC C370CLG //C370.SYSIN DD * (C program) //LKED.SYSIN DD * (external modules) //GO.SYSIN DD * (data)
` Compile and link edit a C program and place it as a member of a cataloged partitioned data set, Jprojcode.MYLIB.
//jobname // /*ROUTE
Documentation The following manuals are located at Remote 1 (414 Ferris), Remote 2 (108 Estabrook Hall), and Remote 8 (67 Glocker). SC09-1264, IBM C/370 User's Guide SC09-1308, Systems Application Architecture: Common Programming Interface, C Reference Level 2 INSPECT C/370 debugger INSPECT is a testing and program analysis aid that helps the programmer examine, monitor, and control execution of programs written in C/370 or PL/I. INSPECT is available on CMS in interactive line mode, on MVS in batch mode, and also on MVS under TSO/ISPF in full-screen mode. The following reference manuals are available at Remotes 1 and 8 and in Ayres Room 101. SC26-4528, INSPECT for C/370 and PL/I: Using INSPECT Under MVS SC26-4529, INSPECT for C/370 and PL/I: Using INSPECT Under CMS
VS COBOL II
COBOL (COmmon Business Oriented Language) is used primarily for commercial data processing. COBOL provides a standard method for expressing solutions to data processing problems involving large files which are updated continuously or periodically and involve large volumes of input and output. UTCC currently runs VS COBOL II (Release 2), a COBOL compiler and library program product of IBM, on the MVS operating system. This is the same version of COBOL that is run on CMS. Cataloged procedures Procedures available: COBV2C, COBV2CL, COBV2CLD, COBV2CLG, COBV2L, COBV2LD, COBV2LG
Procedure Step Names Symbolic Parameters Compile COB COBOPT, COBREG, MODE Link Edit LKED GOPGM, LETGO, LKEDOPT, LKEDREG Load GO GOOPT, GOREG, LETGO, LOADOPT Execute GO GOOPT, GOREG, LETGO Examples
//jobname // /*ROUTE
` Compile and link edit a COBOL program and place it as a member of a cataloged partitioned data set, Jprojcode.MYLIB.
//jobname // /*ROUTE
Debugging features of VS COBOL II VS COBOL II Debug, installed as a standard feature of the VS COBOL II licensed product, is a tool used for debugging programs interactively in full-screen or line mode on TSO (the timesharing option on MVS) and optionally in batch mode. The debug tool allows a programmer to interact with VS COBOL II to trap errors in a program as they happen, temporarily altering program logic and data items at selected points, and then re-execute part or all of the program. On TSO in full-screen mode, split screens allow program debugging and permanent altering of source code simultaneously. Note: For more basic information about TSO, see chapter 6 of this guide, or consult "TSO/ISPF," U01-0583 (available through the PRTDOC facility). VS COBOL II Debug is invoked on TSO by making the FOREGROUND selection (4) on the main ISPF menu and the VS COBOL II Debug selection (10) on the FOREGROUND menu. Formatted dumps. On request, VS COBOL II will produce an easy-to-read formatted dump of key program information when a program abnormally terminates. Documentation The manuals marked with an asterisk are available at Remote 8 and on reserve at Hodges Library. *SC26-4045, VS COBOL II Application Programming Guide GC26-4046, VS COBOL II Application Programming: Sample Programs *GC26-4047, VS COBOL II Application Programming: Language Reference SC26-4049, VS COBOL II Application Programming: Debugging
EASYTRIEVE
EASYTRIEVE is a flexible information retrieval and data management system that uses free-form language to perform built-in operations, including sort, merge, file edit and update, report generation and subroutine calls. Cataloged procedure
Procedure available: EASYTREV
Procedure
Step Name
Symbolic Parameters
GO
GOREG, CYLS
Example
//jobname JOB ,name,GROUP=Jprojcode,USER=Pusercode, // PASSWORD=? /*ROUTE PRINT RMTn //stepname EXEC EASYTREV //FILEB DD UNIT=SYSDA,SPACE=(TRK,(10,10)) //FILEA DD * (data) //SYSIN DD * (EASYTRIEVE program)
Documentation
EASYTRIEVE Reference Manual , available at Remote 8 and on reserve in Hodges Library "EASYTRIEVE," a UTCC videotaped short course, is available in Audiovisual Services at the Hodges Library during regular library hours. Printed course materials to accompany this video course can be obtained from the UTCC receptionist, 200 Stokely Management Center.
EASYTRIEVE PLUS
EASYTRIEVE PLUS combines EASYTRIEVE with many new capabilities and enhancements. Because field definitions and logic are not the same, some programs written in EASYTRIEVE (see above) cannot run in EASYTRIEVE PLUS without modification. Cataloged procedure
Procedure available: EZTPLUS
Procedure
Step Name
Symbolic Parameters
EZTPLUS
REG, CYLS
Example
//jobname // /*ROUTE
(EASYTRIEVE program)
Documentation
VS FORTRAN
The FORTRAN (FORmula TRANslator) programming language is the most widely used scientific programming language in the United States. Although not limited to mathematical problems, it is especially useful for problems which can be stated in
terms of formulas or arithmetic procedures. VS FORTRAN Version 2, currently running on both MVS/ESA and VM/CMS at UTCC, consists of a compiler, library, and debugger. The compiler supports language based on FORTRAN 77 standards plus IBM extensions. On MVS/ESA, the compiler provides scalar, parallel, and vector capabilities. In addition, extended addressing up to 256 megabytes is provided. These features are discussed in the following sections. Enhanced features of the Interactive Debugger include program sampling, timing and vectorization aids. These features are discussed in section 13.6.7. Incompatibilities between program units are generally not detected at compile time and often do not produce error messages at execution time. By using the VS FORTRAN Version 2 intercompilation analysis function, incompatibilities between program units can be detected before attempting to debug a program. See section 13.6.8 for more information. UTCC offers a short course for users on the concepts and techniques of vectorization on the IBM 3090; see section 1.4.2.3 for information about the short course schedule. VS FORTRAN cataloged procedures Procedures available: FORTVC, FORTVCL, FORTVCLD, FORTVCLG, FORTVLG, FORTVLD, FORTVL, FORTDCLG
Symbolic Parameters FORTOPT, FORTREG, LANGLVL, CHARLEN, OPT GOPGM, LETGO, LKEDOPT, LKEDREG, VERSION, GOOPT, GOREG, LETGO, LOADOPT, VERSION, FIRSTLB GOOPT, GOREG, LETGO
The symbolic parameters are described in section 12.3.3. Examples ` Compile, load, and go
//jobname JOB ,name,GROUP=Jprojcode,USER=Pusercode, // PASSWORD=? /*ROUTE PRINT RMTn //stepname EXEC FORTVCLD //FORT.SYSIN DD * (FORTRAN program) //GO.SYSIN DD * (data)
` Compile and link edit a VS FORTRAN program and place it as the first member of a new cataloged partitioned data set, Jprojcode.MYLIB.
//jobname // /*ROUTE
Compatibility with older versions of FORTRAN The LANGLVL=66 option of VS FORTRAN provides compatibility for OS FORTRAN IV source programs written for the G and H Extended compilers and the OS FORTRAN MOD II Library. Upward compatibility for OS FORTRAN G and FORTRAN H Extended object programs is provided. Recompilation is not required in most cases. Compiling VS FORTRAN to generate vector code VS FORTRAN Version 2 compiles source programs to produce either nonvector code (scalar code) or vector code. The scalar and vector code can be produced and run using the UTCC cataloged procedures described in section 13.6.1. The procedures default to scalar compilation and scalar execution, except for calls to the mathematical libraries (ESSL, IMSL and NAG), which default to vector execution. Although the IBM 3090 is a very fast scalar machine, vector processing on the 3090 further reduces the CPU time by using vector instructions and pipelining. A program that is a candidate for vector processing should first be compiled in scalar mode and debugged. Then, for production runs, the program should be recompiled in vector mode to take advantage of the speed of the vector facilities. Vector processing
Vector processing is a technique for reducing the amount of CPU time required for execution of a program. For programs that vectorize well, the CPU time required to run a program in scalar mode will typically be reduced by a factor of two or three when the program is run in vector mode. The VS FORTRAN Version 2 compiler can vectorize FORTRAN DO-loops or subsets of DO-loops that perform the same sequence of operations on successive elements of an array. It also includes three vector directives which allow the programmer to influence the vectorization of the program. VS FORTRAN Version 2 compiler options for vector code Compilation may be done with or without the VECTOR option. The VECTOR option requests automatic vectorization of eligible statements in DO-loops to produce vector code. As much of the loop as possible is translated into vector object code and the remainder is translated into scalar code. A report can be generated showing the vectorization decisions made by the compiler. The VECTOR option requires optimization level 2 or 3; the UTCC cataloged procedures default to OPT=2. To compile with the VECTOR option, add to your JCL FORTOPT='VECTOR(REPORT)' For example, the following JCL uses the FORTVC cataloged procedure: //STEP1 EXEC FORTVC,FORTOPT='VECTOR(REPORT)' REPORT is a VECTOR suboption that produces a report of the vectorization information. It provides information as to which loops or statements within a loop were vectorized and can be used to assist in tuning the source code to obtain even greater benefit from the vector hardware. Alternatively, the VECTOR option can be coded on the VS FORTRAN @PROCESS statement instead of on the EXEC statement. The VECTOR compiler option includes several suboptions. These are described in VS FORTRAN Version 2 Programming Guide , SC26-4222. VS FORTRAN Version 2 vector directives There are times when the VS FORTRAN Version 2 compiler makes decisions about whether or not to vectorize a DO-loop when it clearly has insufficient information. With vector directives, the programmer can impart this run-time information, if it is already known, to the compiler. The three directives are ASSUME, IGNORE, and PREFER. ASSUME lets you set a DO-loop iteration count. IGNORE lets you specify that certain dependencies assumed by the compiler do not, in fact, occur. PREFER lets you specify that a DO-loop be executed in vector or scalar mode. The ASSUME directive is always safe to use because the results of your program will not be affected. The IGNORE directive should be used cautiously because the program results can change if the directive is used unwisely,
producing an error that may be difficult to find. The directives in a program or subroutine are activated by an @PROCESS DIRECTIVE statement. The vector directives are placed in the source code just before the DO-loop to which they apply. There are also global directives for ASSUME and PREFER which apply to more than one DO-loop. For more information on vector directives, see VS FORTRAN Version 2 Programming Guide Using the mathematical libraries with VS FORTRAN Calls can be made to the Engineering and Scientific Subroutine Library (ESSL) from VS FORTRAN. ESSL is highly optimized to take advantage of the IBM 3090 vector hardware. UTCC encourages FORTRAN users to use the ESSL subroutines in their FORTRAN code whenever possible. Both the scalar and the vectorized versions of ESSL are available. In addition, the following mathematical libraries can be called from VS FORTRAN: the vector version of IMSL, the scalar and vectorized versions of the NAG library, and OSL (which automatically makes use of the vector capability of the IBM 3090). The vectorized versions of IMSL and NAG call routines from ESSL. The UTCC cataloged procedures default to the vector versions of the mathematical libraries. To use the scalar versions, include VERSION=SCALAR on the EXEC statement. See section 16.3 for more information about the mathematical libraries at UTCC. Parallel processing On the IBM 3090 supercomputer, there are two choices for execution of VS FORTRAN programs in parallel: the PARALLEL option in VS FORTRAN and the IBM Multitasking Facility (MTF). Both choices support the IBM 3090 vector facilities. However, the use of the vector facilities must be requested for either. PARALLEL option in VS FORTRAN The use of the parallel option in the VS FORTRAN compiler offers an advance in programming technology that makes parallel processing on the IBM 3090 automatic. At the same time, it provides language extensions that give programmers flexibility to create and manage parallel processing programs. The compiler can split the job into different subtasks and allocate them to different processors for parallel execution. Parallel processing is application dependent, and some applications cannot be split for separated processing on different CPUs. For more information users are referred to the VS FORTRAN Version 2 documentation listed in section 13.6.9. Also, the UTCC Newsletter , August 1991, on reserve in Hodges Library, contains the following articles of interest: "VS FORTRAN Version 2 Release 5 available" and "Parallel FORTRAN PRPQ in VS FORTRAN 2.5 Environment."
IBM Multitasking Facility (MTF) MTF allows users to get improved turnaround time for computation-intensive applications by running on multiple processors. Unlike vectorization, multitasking is not automatic. The user must break the program into computationally independent tasks and include calls to parallel subroutines. Because of the overhead associated with the scheduling of tasks, the actual CPU time may increase slightly; however, the elapsed time should decrease. The gains due to parallel processing are application dependent. Three procedures have been installed to simplify the use of the MTF facility at UTCC: FORTMCLG, FORTMCL, and FORTMG. See also Appendix E in VS FORTRAN Version 2 Programming Guide VS FORTRAN extended addressing Under MVS/ESA, VS FORTRAN Version 2 supports extended addressing which allows application programs to run with user data stored above the 16-megabyte address line while the program remains below the 16-megabyte line. The storage hierarchy is managed automatically but requires the dynamic common (DC) compiler option. The option can be coded on the EXEC statement of the VS FORTRAN cataloged procedure or placed on an @PROCESS statement within the program source code. An example using the @PROCESS statement follows.
@PROCESS DC (BIGCOM) DIMENSION X(1000,1000,8) COMMON/BIGCOM/X . . .
The storage for BIGCOM is dynamically loaded at runtime and will not take up part of the 16-megabyte maximum load module size. For more information, see the VS FORTRAN Version 2 Programming Guide VS FORTRAN Interactive Debug (IAD) The Interactive Debug (IAD) component of VS FORTRAN Version 2 provides users the opportunity to monitor and test programs as they run. This is the same debugger that is available on VM/CMS. However, under MVS/ESA, debugging sessions are run in batch mode or in interactive mode under TSO/ISPF. In batch mode, real terminal interaction is not possible; avoid using the HELP command and the commands for controlling the full screen display. IAD invocation under MVS The UTCC cataloged procedures FORTDCLG and FORTDCLD can be used in batch mode to invoke IAD. These procedures contain the DD statements for the required
data sets except for the AFFIN data set, and provide a program listing in addition to debugging output. Both procedures use the compiler option SDUMP and the run-time option DEBUG. All program units to be debugged must be compiled with the SDUMP option. The MVS default for all other VS FORTRAN cataloged procedures is NOSDUMP. IAD takes its directions for debugging from a data set with the ddname AFFIN. AFFON is an optional run-time control dataset used to specify which program units or portions of program units are to be debugged. By default, IAD has access to all executable statements of all debuggable units. Using the AFFON data set, code known to be error free can be excluded to run without the debugging overhead. Program-tuning using IAD In addition to MVS batch mode debugging, IAD can be used to:
` track processing frequency of statements (LISTFREQ command) ` identify the parts of the program that use the most CPU time (program sampling) ` measure the CPU run-time of the program (IAD timing) ` record and display run-time statistics on vector length and stride for each DO-loop in the program (Interactive Vectorization Aid)
Program sampling and timing IAD can be used to analyze the program's CPU usage. This is done by interrupting the program every several milliseconds and recording where the interruption occurred. This technique is called program sampling. It is used to approximate relative run-times of routines, DO-loops and statements, so as to determine the program "hot spots" where tuning efforts can be applied. Users can measure the results of tuning efforts by timing a routine before and after modification. IAD can measure the CPU run-time of the program units, or of the DO-loops within a program unit. Program sampling and timing cannot be performed in the same run of the program. The Interactive Vectorization Aid (IVA) is a set of IAD functions used to collect information while running vector programs. It enables gathering statistics at the DO-loop level. To use the IVA functions with FORTDCLG or FORTDCLD compile the program with the VECTOR(IVA) option to generate the program information data set. Program sampling invocation There are three commands for program sampling: ENDDEBUG, LISTSAMP, and ANNOTATE. ENDDEBUG with the SAMPLE option initiates program sampling; LISTSAMP lists sampling counts; and ANNOTATE annotates the listing with the sampling counts. The JCL below performs program sampling at the subprogram level on a program running in scalar mode.
//stepname EXEC FORTDCLG //FORT.SYSIN DD * (FORTRAN program) //GO.AFFIN DD * ENDDEBUG SAMPLE
Timing invocation There are three commands for IAD DO-loop timing: TIMER, GO, and LISTTIME. TIMER with the DOLOOP option turns on DO-loop timing information gathering; GO starts program execution; and LISTTIME with the DOLOOP option displays the DO-loop timing results. The JCL below performs DOloop timing on a program running in vector mode.
//stepname EXEC FORTDCLG,FORTOPT='VECTOR(IVA)' //FORT.SYSIN DD * (FORTRAN program) //GO.AFFIN DD * TIMER *.* DOLOOP ON GO LISTTIME *.* DOLOOP QUIT //GO.SYSIN DD *
IVA invocation for DO-loop vector tuning There are two commands for gathering and displaying run-time statistics on vector length and stride of each DO-loop: VECSTAT and LISTVEC. VECSTAT gathers vector tuning statistics and LISTVEC displays the results. The JCL below gathers DO-loop length and stride information on lines 20-40 of program unit SUB1 and displays the results. It consists of three steps: compile, link-edit, and run with IAD.
//stepname EXEC FORTDCLG,FORTOPT='VECTOR(IVA)' //FORT.SYSIN DD * (FORTRAN program) //GO.AFFIN DD * VECSTAT SUB1.20:40 ON LISTVEC *.* //GO.SYSIN DD *
Intercompilation Analyzer (ICA) The VS FORTRAN VERSION 2 Intercompilation Analyzer (ICA) identifies incompatibilities between program units and produces a list of messages identifying the discrepancies. An external cross reference list is also produced. ICA generates only warning messages, which are written to a listing file. The analysis includes a check for:
` conflicting actual and dummy arguments in subroutine calls and function references ` conflicting external names usage ` conflicting named common block usage
ICA invocation To use ICA, compile your program with the ICA option. For example, //stepname EXEC FORTVC,FORTOPT='ICA' ICA can handle separately compiled source code files by creating and updating the datasets. The ICA options are described in the ;.us VS FORTRAN Version 2Programming Guide Documentation The following manuals are on reserve in Hodges Library, and additional copies are in the manual racks at the remotes listed in parentheses: GC26-4219, VS FORTRAN Version 2 General Information SC26-4221, VS FORTRAN Version 2 Language and Library Reference (at Remotes 1, 2, 8, 17, 28) SC26-4222, VS FORTRAN Version 2 Programming Guide (at Remotes 1, 2, 8, 17, 28) SC26-4223, VS FORTRAN Version 2 Interactive Debug Guide and Reference (at Remote 1) FORTRAN Translation Tool The IBM FORTRAN Translation Tool is a program that assists in converting FORTRAN source code written for Digital Equipment Corporation (DEC) and Control Data Corporation (CDC) computers to acceptable input statements for the IBM VS FORTRAN Compiler. The converted code conforms to the ANSI X3.9-1978 language level known as FORTRAN 77. Input requirements Input source to the translator must be error-free in its native dialect. Debugging statements should be removed in advance as they are not recognizable to the translator and will become comment statements. The source code must be fixed format with a record length of 80 or 132, unblocked, or VAX TAB format and may be in uppercase and lowercase ASCII or EBCDIC. The minimum virtual storage area required to execute the translator program is two megabytes. See the IBM FORTRAN Translation Tool Program Description/Operation Manual , in the manual racks at Remotes 1 and 2, for a list of other translator limitations. Execution on MVS On MVS, the UTCC cataloged procedure FORTXLAT is provided for running the translator program. In the FORTXLAT procedure, the output for the converted source (NEWFORT) is defined on the FT11F001 DD statement as SYSOUT=*. This produces a hardcopy output listing. To store the converted source on a permanent
MVS disk data set for subsequent modification using the TSO ISPF/PDF editor, you must specify JCL to allocate a permanent disk data set. An example is given below for a sequential output data set.
//STEP1 //FT11F001 // // //SYSIN EXEC FORTXLAT DD DSN=Jprojcode.NEWFORT,DISP=(NEW,CATLG,DELETE), UNIT=ONLINE,SPACE=(TRK,(20,5),RLSE), DCB=(RECFM=FB,LRECL=80,BLKSIZE=6320) DD DSN=SYS1.FORTXLAT.CNTL(SAMPLES),DISP=SHR
For those who edit and submit MVS batch JCL from CMS, you can have the translated output (NEWFORT) returned to your CMS reader where it can then be received and edited with CMS XEDIT. To do so, specify the following parameters on the FT11F001 DD statement (where userid is your CMS logon userid). //FT11F001 DD SYSOUT=*,DEST=(UTKVM1,userid) Executing translated programs Translated programs can normally be executed after compilation and linkage with the VS FORTRAN compiler and subroutine libraries. If the translated program contains calls to the translator-supplied execution-time routines, they must be made available to the translated FORTRAN program (see the manual). On MVS, calls to these routines are resolved at link-edit time by specifying SYS1.FORTXLAT.TRANSLIB as the data set on the link-edit SYSLIB DD statement. An example is given below.
//STEP1 EXEC FORTVCLG //SYSIN DD DSN=Jprojcode.NEWFORT,DISP=SHR //LKED.SYSLIB DD DSN=SYS1.FORTXLAT.TRANSLIB,DISP=SHR
Pascal
VS Pascal is a high-level programming language designed for teaching structured computer programming, a top-down, modular approach to program development. Its objective is to emphasize the importance of well-thought-out program design that, in turn, makes programs less complex and easier to understand, debug, and maintain. Cataloged procedures
Procedures available: VSPASC, VSPASCL, VSPASCLD, VSPASCLG, VSPASL, VSPASLD, VSPASLG
Procedure
Step Name
PASC LKED GO
Examples
//jobname // /*ROUTE
//jobname // /*ROUTE
VS Pascal is also available on the TSO operating system in interactive line mode. See the VS Pascal Application Programming Guide for a full description of compiler options, program compilation and execution, and invocation of the debugging environment. Documentation The following manuals are available for reference at Remotes 1, 2, and 8. SC26-4319, VS Pascal Application Programming Guide SC26-4320, VS Pascal Language Reference
PL/I
PL/I is a structured programming language suitable for a wide range of programming applications. The variety of features provided by PL/I, as well as the simplicity of the concepts underlying them, demonstrate the versatility of the language. It is possible for users to use only those facilities needed to solve their particular problems without having to learn all the other characteristics of the language. UTCC supports two PL/I compilers; the PL/C compiler developed at Cornell University, and the IBM PL/I Optimizing compiler. The Cornell PL/C compiler The PL/C compiler features high compilation speeds, good diagnostic assistance, and strict upward compatibility with the optimizing compiler. These features make PL/C useful for educational use and initial program checkout. PL/C allows batching of programs within a job step and requires a minimum region size of 128K. PL/C cataloged procedures
Procedures available:
PLC
Procedure
Step Name
Symbolic Parameters
GO
GOREG
PL/C control statements Each PL/C program must be preceded by a statement with *PL/C in columns 1-5. This statement may also contain specifications of various PL/C parameters to override default specifications built into the system. Some of the parameters are given below with their default values. PAGES=nn The maximum number of pages of output to be produced by both compilation and execution; the default is 30 pages. TIME=(mm,ss) The time in minutes and seconds to which compilation and execution are limited; the default is 55 seconds. Note: Any PL/C job requiring more than 9 seconds CPU time must include the TIME parameter on the JOB statement in the MVS JCL. Any PL/C job requiring more than 55 seconds must code the TIME parameter on the JOB statement and the TIME parameter in the options field on the *PL/C statement. The TIME parameter on the JOB statement must be at least one second greater than the TIME parameter on the *PL/C statement. ERRORS=(xx,yy) The first number specifies the number of compile errors that will suppress execution; the second number indicates the number of execution-time errors that will cause execution to be terminated; default is ERRORS=(50,50). These parameters may appear on the *PL/C statement beginning in column seven or after, in any combination, in any order, separated by one or more commas or blanks. If the program requires data for execution, the data must be preceded by a statement with *DATA in columns 1-5. If no data is required then the *DATA statement is optional. Although PL/C is a compiler rather than an interpreter, it is not possible to obtain an object module in order to avoid compilation on subsequent runs. Execution can be suppressed, however, by specifying ERRORS=(0,0) on the *PL/C control statement. This will permit compilation but inhibit execution.
Examples
` Execute PL/C with batching
//jobname // /*ROUTE
//stepname EXEC //GO.SYSIN DD *PL/C (PL/C program) *DATA (data) *PL/C (PL/C program) *DATA (data)
NOTE: The PL/C User's Guide is printed in double column format; therefore narrow forms must not be requested. The default form number, which specifies greenbar paper, should not be changed. PL/I optimizing compiler The PL/I optimizing compiler is designed specifically for the generation of fast object programs. It does, however, allow the programmer the choice, at compile time, of fast compilation of a source program or fast execution of the resulting object program. The optimizing compiler has several features that do not exist in earlier PL/I compilers, including the DEFAULT statement, file variables, entry variables and new compile time preprocessor facilities. Cataloged procedures
Procedures available: PL1XC, PL1XCL, PL1XCLG, PL1XL, PL1XLG, PL1XCLD, PL1XLD
Symbolic Parameters OPT, PL1OPT, PL1REG GOPGM, LETGO, LKEDOPT, LKEDREG GOOPT, GOREG, LETGO, LOADOPT GOOPT, GOREG, LETGO
Examples
//jobname // /*ROUTE
(PL/I program)
//jobname // /*ROUTE
` Compile and link edit a PL/I program and place it as a member of a cataloged partitioned data set, Jprojcode.MYLIB.
//jobname // /*ROUTE
Documentation The following manuals are on reserve in Hodges Library. SC26-4307, OS PL/I Version 2 Programming Guide SC26-4308, OS PL/I Version 2 Programming: Language Reference INSPECT PL/I debugger INSPECT is a testing and program analysis aid that helps the programmer examine, monitor, and control execution of programs written in C/370 or PL/I. INSPECT is available on CMS in interactive line mode, on MVS in batch mode, and also on MVS under TSO/ISPF in full-screen mode. The following reference manuals are available at Remotes 1 and 8 and in Ayres Room 101. SC26-4528, INSPECT for C/370 and PL/I: Using INSPECT Under MVS SC26-4529, INSPECT for C/370 and PL/I: Using INSPECT Under CMS
Procedure
Step Names
Symbolic Parameters
Compile
RPG
RPGOPT, RPGREG
Link Edit
LKED
Load
GO
Execute
GO
Example
//jobname // /*ROUTE
//stepname EXEC RPGECLD //RPG.SYSIN DD (RPG program) //GO.file1 DD //GO.file2 DD * (data) SYSOUT=* *
where file1 is the file name (columns 7-14 on File Description Specifications) of an output file to be printed and file2 is the file name of an input file of data statements. Documentation GC24-3337, OS/360 RPG Language Specifications
SPITBOL
The SNOBOL4 programming language is a string-manipulation and list-processing language developed at Bell Laboratories. The implementation available at UTCC is SPITBOL, written at Illinois Institute of Technology. SPITBOL is smaller than the original implementation of SNOBOL4 (128K vs 192K) and has execution speeds of up to 10 times faster. There are, however, some incompatibilities between SNOBOL4 and SPITBOL.
Cataloged procedures
Procedures
Step Name
Symbolic Parameters
SPITBOL
SPITREG, SPITOPT
SPITOBJ
SPITREG, SPITOPT
SPITLKED
SPITREG, SPITOPT
Default Values for Symbolic Parameters The default values for the symbolic parameters are
SPITREG=128K SPITOPT='T=55,P=1000000,C=1000000'
where T is the CPU time in seconds, P is the number of pages of printed output for compilation and execution, and C is the number of card images generated. It should be noted, however, that the parameters on the JOB and JOBPARM statements, whether coded or default, will override any values for the symbolic parameters.
Examples
` Execute SPITBOL
//jobname // /*ROUTE
//jobname
JOB ,name,GROUP=Jprojcode,USER=Pusercode,
// /*ROUTE
//jobname // /*ROUTE
(SPITBOL program 1 and data) (SPITBOL program 2 and data) (SPITBOL program 3 and data)
` Create a load module library called Jprojcode.Pusercode.libname with one member named 'PGM1'
(SPITBOL program)
` Execute the SPITBOL program 'PGM1' from the load module library Jprojcode.Pusercode.libname
Documentation Griswold, Poage, and Polonsky, The SNOBOL4 Programming Language Griswold and Griswold, A SNOBOL4 Primer Illinois Institute of Technology, SPITBOL Version 2.0
immediate execution. However, the loader does not have some of the more advanced features of the linkage editor. Also, at execution time it occupies a significant amount of main storage that might otherwise be used for the user's program. Steps invoking the linkage editor or loader are a part of the standard cataloged procedures for the compilers. There are a few procedures which use the linkage editor or loader alone rather than in conjunction with a compiler. No libraries are included in these procedures. Linkage editor cataloged procedures
Procedures available: LKED, LKEDG
Procedure
Step Name
Symbolic Parameters
Link Edit
LKED
LKEDOPT, LKEDREG
Execute
GO GOOPT,GOREG
Example
` Link edit and create a load module named MLOAD, add it to an existing load library, Jprojcode.libname, replacing any previously existing load module with the same name in that library.
//jobname // /*ROUTE
Loader cataloged procedures Procedures available: GO, LOADG, LOADGO Procedure Step Name Symbolic Parameters Load GO LOADOPT, GOOPT Example
` Load and Go
//jobname // /*ROUTE
Abend-AID
Abend-AID, which includes OS Abend-AID, Abend-AID/COBOL, and AbendAID/ONLINE, is available under the MVS operating system running on the IBM 3090 processors. Abend-AID analyzes program abends (abnormal endings). An operating system enhancement, Abend-AID transfers the manual task of analyzing program abends from the programmer to the computer. Abend-AID tells WHAT,
WHERE, and WHY the abend happened. Its main objectives are reducing costs and improving programmer productivity. Abend-AID intercepts the abend before the IBM dump is triggered. Abend-AID provides only the appropriate output necessary for the programmer to fix the abending program, suppressing the printing of superfluous control blocks, etc. All the information is provided on three or four pages. In some instances, Abend-AID allows a normal IBM dump to occur. An example of this is when important parts of program storage have been destroyed and a complete analysis is not possible. Abend-AID invocation Abend-AID processing is enabled by installation default for all jobs which abend. It is invoked by including a SYSUDUMP or SYSABEND DD statement in the JCL. Users of SYSMDUMP must also include the //ABENDAID DD statement to get Abend-AID output. If required, users can override the default actions of Abend-AID at the job step level. To shut off Abend-AID allowing a normal IBM dump, include the //ABNLIGNR DD DUMMY statement within the job step. To force an IBM dump in addition to the Abend-AID output, include the //ABNLDUMP DD DUMMY statement within the job step. To suppress printing of the IBM dump in the event Abend-AID is unable to diagnose the problem, include the //ABNLNODP DD DUMMY statement within the job step. Additional PL/I support Non-Abending PL/I programming language support provides "hooks" to the PL/I file close and library termination routines. It interfaces to the SNAPAID module which takes a SNAPDUMP of the program error and prints information regarding the PL/I error. Abend/AID then returns control to the PL/I library for orderly termination of the PL/I environment. To invoke the Abend-AID "on code" analysis report, include an //ABENDAID DD statement in the GO step. (A hook for PLIDUMP is not used in this support. However, a call to PLIDUMP will invoke the PL/I support, and a PL/I dump will be produced if a PLIDUMP DD statement is present in the JCL stream.) Additional COBOL support Abend-AID/COBOL is a compiler enhancement that extends the debugging capability of basic Abend-AID. In the compile environment, Abend-AID/COBOL produces more efficient program listings, calculates data element positions in decimal, automatically documents record layouts, and identifies compiler errors at the source statement. In the debugging environment, AbendAID/COBOL identifies the exact source statement causing the abend, provides symbolic name contents of the field in error, displays working-storage by symbolic field name, displays current in record layout format, and traces program calls by statement number. VS COBOL II UTCC procedures (procs) include the symbolic parameter MODE. Abend-AID/COBOL is invoked by specifying MODE=COBOLAID on the EXEC statement. Valid modes are IGYCRCTL, the default, which invokes the COBOL compiler without COBOLAID, and COBOLAID
which invokes Abend-AID/COBOL. The COBOL options required when using COBOLAID are as follows:
LIST/OFFSET MAP SOURCE XREF NOWORD NOTERM NOSYNTAX
Abend-AID/ONLINE Abend-AID/ONLINE is a feature that allows the Abend-AID output to be formatted into 72 columns for viewing at the terminal. This is the default. To force 121 column output, include an ABNLWIDE DD DUMMY statement within the job step. Snap-AID Snap-AID is the Abend-AID Snap Dump Facility which prints working storage and file information without abending. It is invoked by a subroutine call to the module SNAPAID. COBOL programmers not using the DYNAM option, and other language programmers will need to include UNT1.MVS.LINKLIBP in the SYSLIB DD statement for their or code a linkage editor INCLUDE statement for the SNAPAID subroutine module. To invoke Snap-AID, the DD DUMMY statement is required in the GO step. The pseudo abend code is reported as SNAP. The page titles indicate an Abend-AID Snapshot. Abend-AID DD statements A list from the OS Abend-AID Installation and Reference Manual of valid, optional Abend-AID DD statements is shown below. These statements can be used within job steps to override Abend-AID default settings. If two mutually exclusive DD statements are present in the JCL, the last one encountered will be the one that takes effect.
DD Statement
Description
//ABENDAID DD SYSOUT=*
Alternate DD for Abend-AID output (Note: A SYSUDUMP/SYSABEND DD is still required to invoke Abend-AID. Users of
SYSMDUMP must use the ABENDAID DD to get Abend-AID output. Abend-AID will not write to SYSMDUMP.) //ABNLALL DD DUMMY Forces formatting of all program storage and control blocks //ABNLDUMP DD DUMMY //ABNLENAB DD DUMMY Forces printing of the normal IBM dump Enables Abend-AID when it has been disabled globally //ABNLFMTD DD DUMMY Forces printing of only the formatted control blocks portion of the IBM dump //ABNLHELP DD DUMMY Produces the Abend-AID help pages when disabled globally //ABNLIGNR DD DUMMY //ABNLNCBS DD DUMMY Shuts off Abend-AID processing Suppresses printing of the Abend-AID data management control blocks section //ABNLNODP DD DUMMY //ABNLNONE DD DUMMY //ABNLNWSP DD DUMMY Suppresses printing of the IBM dump Opposite of //ABNLALL Suppresses printing of the Abend-AID program storage section //ABNLPCBS DD DUMMY Forces printing of the Abend-AID data management control blocks section //ABNLSUPT DD DUMMY Suppresses the inclusion of Abend-AID/ COBOL information in the object module (Note: When this DD statement is used, the enhanced Abend-AID/COBOL output will not be available at abend time.)
//ABNLSUPW DD DUMMY
//ABNLTERM DD SYSOUT=*
Invokes the Abend-AID/ONLINE feature for 72-column output when 121-column output is the default
//ABNLTERM DD DSN=
//ABNLWIDE DD DUMMY
//ABNLWSPT DD DUMMY