P. 1


|Views: 25|Likes:
Published by venku33

More info:

Published by: venku33 on May 13, 2012
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as DOCX, PDF, TXT or read online from Scribd
See more
See less





1.how do you handle exceptions in PLI? Using On error codes 2.Difference between verify and index?

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

IBM User's Guide, Thirteenth Edition 13 General Programming Languages on MVS
On the MVS/ESA operating system, the routine steps of program development, testing and execution are accomplished by calling for the execution of cataloged

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

Procedure Assemble Link Edit Load Execute




` Assemble, load, and go

//jobname // /*ROUTE


//stepname EXEC //ASM.SYSIN DD

(Assembler program) //GO.SYSIN (data ) DD *

` Assemble, load and go with multiple Assembler programs

//jobname // /*ROUTE //STEP1 //ASM.SYSIN


(first Assembler program) //STEP2 //ASM.SYSIN EXEC DD ASMHCLD *

(second Assembler program) //GO.SYSIN (data) DD *

and batching facilities. ASSIST provides several special pseudo-machine instructions which facilitate I/O. Jprojcode.name. Assembler H Version 2 Application Programming: Language Reference and 28 ASSIST ASSIST.` Assemble and link edit an Assembler program and place it as a member of a cataloged partitioned data set. is intended primarily for student course work in Assembler language programming. 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.SYSLMOD DD DSN=Jprojcode.MYLIB.GROUP=Jprojcode.MYLIB(program_name). ASSIST provides a smaller but more meaningful completion dump than the ABEND dump produced by the operating system. Assembler H Version 2 Application Programming: Guide located in Remote 28 (Physics) GC26-4037.USER=Pusercode. In addition to register contents and user storage areas. which features high-speed compilation.DISP=OLD Documentation SC26-4036. ASSIST also provides a replacement capability which allows users to substitute their own versions of certain modules in the ASSIST assembler. low overhead. PASSWORD=? PRINT RMTn //stepname EXEC ASMHCL //ASM. In case of abnormal termination. //jobname // /*ROUTE JOB . extensive diagnostics.SYSIN DD * (Assembler program) //LKED. Cataloged procedures Procedures available: ASSIST .

INPUT DD * (data) Documentation The following job produces the ASSIST User's Guide . U05-0082.GROUP=Jprojcode.GUIDE=ASSIST.GROUP=Jprojcode.USER=Pusercode. PASSWORD=? //stepname EXEC ASSIST //SYSIN DD * (Assembler program) //GO.Procedure Step Name Symbolic Parameters Assemble and Execute GO GOREG Example ` Executing ASSIST //jobname // JOB . PASSWORD=? PRINT RMTn LINES=5 PRTGUIDE.name.USER=Pusercode. //jobname // /*ROUTE /*JOBPARM JOB .name. .UCS=TN //stepname EXEC ASSIST: Introductory Assembler User's Manual is on reserve in Hodges Library.

flexibility in building applications. LETGO. GOREG GOREG. PASSWORD=? PRINT RMTn . GOOPT. Cataloged procedures Procedures available: C370C.name. C370LG.USER=Pusercode. GOOPT.GROUP=Jprojcode. C370CL. C370OPT LKEDREG. The C/370 Multitasking Facility (MTF) allows a single C/370 program to use multiple processors simultaneously. GOPGM LOADOPT. C370CLD Procedure Compile Link Edit Load Execute Step Names C370 LKED GO GO Symbolic Parameters C370REG. GOPGM Examples ` Compile and execute //jobname // /*ROUTE JOB . Its key features are its small size relative to other languages. C370CLG. The C compiler on MVS/ESA supports 31-bit addressing and parallel processing. and the ease in which code can be transported from one computing environment to another.IBM C The IBM C programming language permits a programmer to deal with machine-level entities at a low level of control. LKEDOPT. LETGO. fast execution speed. while providing the high level of control and data structures associated with modern structured programming languages. and programs and object modules developed on one system may be used on the other. C370L. The C compilers on CMS and MVS are compatible. C370LD.

PASSWORD=? PRINT RMTn //stepname EXEC C370CLG //C370.GROUP=Jprojcode. Jprojcode.SYSIN DD * (C program) //GO.name.SYSIN DD * (data) ` Compile and link edit a C program and place it as a member of a cataloged partitioned data set.USER=Pusercode. //jobname // /*ROUTE JOB .MYLIB. and execute //jobname // /*ROUTE JOB . PASSWORD=? PRINT RMTn //stepname EXEC C370CL .SYSIN DD * (external modules) //GO.name.USER=Pusercode.//stepname EXEC C370CLD //C370.GROUP=Jprojcode. link edit.SYSIN DD * (data) ` Compile.SYSIN DD * (C program) //LKED.

monitor. 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. on the MVS operating system. a COBOL compiler and library program product of IBM. INSPECT is available on CMS in interactive line mode.DISP=OLD Documentation The following manuals are located at Remote 1 (414 Ferris). Remote 2 (108 Estabrook Hall). and Remote 8 (67 Glocker). Systems Application Architecture: Common Programming Interface. COBV2LG . on MVS in batch mode.MYLIB(program_name). The following reference manuals are available at Remotes 1 and 8 and in Ayres Room 101. and also on MVS under TSO/ISPF in full-screen mode. and control execution of programs written in C/370 or PL/I. This is the same version of COBOL that is run on CMS.//C370. COBV2CLG. COBV2CL.SYSLMOD DD DSN=Jprojcode. SC09-1264. 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. INSPECT for C/370 and PL/I: Using INSPECT Under MVS SC26-4529. COBV2L.SYSIN DD * (C program) //LKED. COBV2CLD. IBM C/370 User's Guide SC09-1308. Cataloged procedures Procedures available: COBV2C. C Reference Level 2 INSPECT C/370 debugger INSPECT is a testing and program analysis aid that helps the programmer examine. SC26-4528. UTCC currently runs VS COBOL II (Release 2). COBV2LD.

LKEDOPT.USER=Pusercode.DISP=OLD .SYSLMOD DD DSN=Jprojcode.MYLIB(program_name). LETGO.Procedure Step Names Symbolic Parameters Compile COB COBOPT.USER=Pusercode. GOREG.SYSIN DD * (COBOL program) //LKED. LKEDREG Load GO GOOPT. COBREG.SYSIN (data) DD * ` Compile and link edit a COBOL program and place it as a member of a cataloged partitioned data set. //jobname // /*ROUTE JOB .GROUP=Jprojcode. MODE Link Edit LKED GOPGM. and go //jobname // /*ROUTE JOB . GOREG. PASSWORD=? PRINT RMTn COBV2CLD * //stepname EXEC //COB. LETGO Examples ` Compile.name. Jprojcode. LETGO.name.SYSIN DD (COBOL program) //GO.MYLIB.GROUP=Jprojcode. PASSWORD=? PRINT RMTn //stepname EXEC COBV2CL //COB. LOADOPT Execute GO GOOPT. load.

temporarily altering program logic and data items at selected points. Cataloged procedure Procedure available: EASYTREV Procedure Step Name Symbolic Parameters ." U01-0583 (available through the PRTDOC facility). split screens allow program debugging and permanent altering of source code simultaneously.Debugging features of VS COBOL II VS COBOL II Debug. report generation and subroutine calls. *SC26-4045. 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. The debug tool allows a programmer to interact with VS COBOL II to trap errors in a program as they happen. 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. file edit and update. Documentation The manuals marked with an asterisk are available at Remote 8 and on reserve at Hodges Library. Note: For more basic information about TSO. and then re-execute part or all of the program. On request. VS COBOL II Application Programming: Language Reference SC26-4049. VS COBOL II Application Programming Guide GC26-4046. VS COBOL II Application Programming: Sample Programs *GC26-4047. 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. or consult "TSO/ISPF. see chapter 6 of this guide. On TSO in full-screen mode. merge. including sort. VS COBOL II will produce an easy-to-read formatted dump of key program information when a program abnormally terminates. Formatted dumps. installed as a standard feature of the VS COBOL II licensed product.

USER=Pusercode. CYLS Example //jobname JOB ." a UTCC videotaped short course. Printed course materials to accompany this video course can be obtained from the UTCC receptionist. Cataloged procedure Procedure available: EZTPLUS . available at Remote 8 and on reserve in Hodges Library "EASYTRIEVE.SPACE=(TRK.Compile and Execute GO GOREG.name. // PASSWORD=? /*ROUTE PRINT RMTn //stepname EXEC EASYTREV //FILEB DD UNIT=SYSDA. some programs written in EASYTRIEVE (see above) cannot run in EASYTRIEVE PLUS without modification. Because field definitions and logic are not the same. EASYTRIEVE PLUS EASYTRIEVE PLUS combines EASYTRIEVE with many new capabilities and enhancements. is available in Audiovisual Services at the Hodges Library during regular library hours. 200 Stokely Management Center.(10.GROUP=Jprojcode.10)) //FILEA DD * (data) //SYSIN DD * (EASYTRIEVE program) Documentation EASYTRIEVE Reference Manual .

10)) DD * (EASYTRIEVE program) Documentation EASYTRIEVE Plus Self Study Course EASYTRIEVE Plus Reference Manual VS FORTRAN The FORTRAN (FORmula TRANslator) programming language is the most widely used scientific programming language in the United States. PASSWORD=? PRINT RMTn //stepname EXEC EZTPLUS //FILEB //FILEA (data) //SYSIN DD * DD UNIT=SYSDA. CYLS Example //jobname // /*ROUTE JOB .name. it is especially useful for problems which can be stated in .GROUP=Jprojcode.SPACE=(TRK.(10.Procedure Step Name Symbolic Parameters Compile and Execute EZTPLUS REG.USER=Pusercode. Although not limited to mathematical problems.

LETGO The symbolic parameters are described in section 12. LKEDREG. FORTVLD. GOREG. GOREG. LOADOPT. The compiler supports language based on FORTRAN 77 standards plus IBM extensions. Examples ` Compile. LETGO. consists of a compiler.7. Enhanced features of the Interactive Debugger include program sampling. FORTVCLD.6. On MVS/ESA.4. Incompatibilities between program units are generally not detected at compile time and often do not produce error messages at execution time. VERSION. FORTVL.3.GROUP=Jprojcode. By using the VS FORTRAN Version 2 intercompilation analysis function. // PASSWORD=? /*ROUTE PRINT RMTn //stepname EXEC FORTVCLD //FORT. the compiler provides scalar. FIRSTLB GOOPT. VS FORTRAN Version 2. FORTVCL. LETGO. FORTDCLG Procedure Compile Link Edit FIRSTLB Load Execute Step Names FORT LKED GO GO Symbolic Parameters FORTOPT.8 for more information. timing and vectorization aids. FORTVLG. incompatibilities between program units can be detected before attempting to debug a program.2.terms of formulas or arithmetic procedures. see section 1.6. FORTVCLG. library.USER=Pusercode. See section 13. These features are discussed in the following sections. VS FORTRAN cataloged procedures Procedures available: FORTVC. UTCC offers a short course for users on the concepts and techniques of vectorization on the IBM 3090. OPT GOPGM. VERSION. These features are discussed in section 13.3.3 for information about the short course schedule.SYSIN DD * (data) . CHARLEN. FORTREG. and go //jobname JOB . currently running on both MVS/ESA and VM/CMS at UTCC. In addition. load. parallel. and vector capabilities. LKEDOPT. and debugger. GOOPT.SYSIN DD * (FORTRAN program) //GO. extended addressing up to 256 megabytes is provided. LANGLVL.name.

Although the IBM 3090 is a very fast scalar machine. except for calls to the mathematical libraries (ESSL. Vector processing . Upward compatibility for OS FORTRAN G and FORTRAN H Extended object programs is provided. the program should be recompiled in vector mode to take advantage of the speed of the vector facilities. // DISP=(NEW. Jprojcode.1. 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. //jobname // /*ROUTE JOB .SYSIN DD * (FORTRAN program) //LKED.SYSLMOD DD DSN=Jprojcode.6. The scalar and vector code can be produced and run using the UTCC cataloged procedures described in section 13. which default to vector execution. Then. PASSWORD=? PRINT RMTn //stepname EXEC FORTVCL //FORT. Compiling VS FORTRAN to generate vector code VS FORTRAN Version 2 compiles source programs to produce either nonvector code (scalar code) or vector code. Recompilation is not required in most cases. The procedures default to scalar compilation and scalar execution.name. IMSL and NAG).` Compile and link edit a VS FORTRAN program and place it as the first member of a new cataloged partitioned data set. for production runs.MYLIB.MYLIB(member_name).UNIT=ONLINE 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.USER=Pusercode.CATLG).GROUP=Jprojcode.

To compile with the VECTOR option. For programs that vectorize well.FORTOPT='VECTOR(REPORT)' REPORT is a VECTOR suboption that produces a report of the vectorization information. the programmer can impart this run-time information. ASSUME lets you set a DO-loop iteration count. the UTCC cataloged procedures default to OPT=2. Alternatively. 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. The ASSUME directive is always safe to use because the results of your program will not be affected. to the compiler. 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. It also includes three vector directives which allow the programmer to influence the vectorization of the program. IGNORE lets you specify that certain dependencies assumed by the compiler do not. add to your JCL FORTOPT='VECTOR(REPORT)' For example. VS FORTRAN Version 2 compiler options for vector code Compilation may be done with or without the VECTOR option. SC26-4222. With vector directives. IGNORE. occur. the following JCL uses the FORTVC cataloged procedure: //STEP1 EXEC FORTVC. PREFER lets you specify that a DO-loop be executed in vector or scalar mode. if it is already known. 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 IGNORE directive should be used cautiously because the program results can change if the directive is used unwisely.Vector processing is a technique for reducing the amount of CPU time required for execution of a program. 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. The VECTOR compiler option includes several suboptions. These are described in VS FORTRAN Version 2 Programming Guide . The three directives are ASSUME. A report can be generated showing the vectorization decisions made by the compiler. and PREFER. The VECTOR option requires optimization level 2 or 3. . in fact. the VECTOR option can be coded on the VS FORTRAN @PROCESS statement instead of on the EXEC statement. 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.

Parallel processing is application dependent. UTCC encourages FORTRAN users to use the ESSL subroutines in their FORTRAN code whenever possible.6. on reserve in Hodges Library. include VERSION=SCALAR on the EXEC statement. The directives in a program or subroutine are activated by an @PROCESS DIRECTIVE statement." .9. 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. August 1991. the UTCC Newsletter . Both choices support the IBM 3090 vector facilities. In addition. there are two choices for execution of VS FORTRAN programs in parallel: the PARALLEL option in VS FORTRAN and the IBM Multitasking Facility (MTF). the use of the vector facilities must be requested for either. The UTCC cataloged procedures default to the vector versions of the mathematical libraries. The compiler can split the job into different subtasks and allocate them to different processors for parallel execution. contains the following articles of interest: "VS FORTRAN Version 2 Release 5 available" and "Parallel FORTRAN PRPQ in VS FORTRAN 2. it provides language extensions that give programmers flexibility to create and manage parallel processing programs. and some applications cannot be split for separated processing on different CPUs.5 Environment. See section 16. There are also global directives for ASSUME and PREFER which apply to more than one DO-loop. the scalar and vectorized versions of the NAG library. Parallel processing On the IBM 3090 supercomputer. To use the scalar versions. the following mathematical libraries can be called from VS FORTRAN: the vector version of IMSL. However.3 for more information about the mathematical libraries at UTCC.producing an error that may be difficult to find. The vector directives are placed in the source code just before the DO-loop to which they apply. Also. For more information users are referred to the VS FORTRAN Version 2 documentation listed in section 13. ESSL is highly optimized to take advantage of the IBM 3090 vector hardware. The vectorized versions of IMSL and NAG call routines from ESSL. At the same time. Both the scalar and the vectorized versions of ESSL are available. 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. and OSL (which automatically makes use of the vector capability of the IBM 3090).

IBM Multitasking Facility (MTF) MTF allows users to get improved turnaround time for computation-intensive applications by running on multiple processors.8) COMMON/BIGCOM/X . These procedures contain the DD statements for the required . The storage hierarchy is managed automatically but requires the dynamic common (DC) compiler option. FORTMCL. For more information. . the elapsed time should decrease. The storage for BIGCOM is dynamically loaded at runtime and will not take up part of the 16-megabyte maximum load module size. 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. avoid using the HELP command and the commands for controlling the full screen display. 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. debugging sessions are run in batch mode or in interactive mode under TSO/ISPF. However. Three procedures have been installed to simplify the use of the MTF facility at UTCC: FORTMCLG. See also Appendix E in VS FORTRAN Version 2 Programming Guide VS FORTRAN extended addressing Under MVS/ESA. multitasking is not automatic. however. IAD invocation under MVS The UTCC cataloged procedures FORTDCLG and FORTDCLD can be used in batch mode to invoke IAD. the actual CPU time may increase slightly. under MVS/ESA. and FORTMG. The gains due to parallel processing are application dependent. @PROCESS DC (BIGCOM) DIMENSION X(1000. In batch mode. real terminal interaction is not possible.1000. Because of the overhead associated with the scheduling of tasks. 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. . Unlike vectorization. The user must break the program into computationally independent tasks and include calls to parallel subroutines.

LISTSAMP lists sampling counts.SYSIN DD * (FORTRAN program) //GO.AFFIN DD * ENDDEBUG SAMPLE . IAD takes its directions for debugging from a data set with the ddname AFFIN. This technique is called program sampling. To use the IVA functions with FORTDCLG or FORTDCLD compile the program with the VECTOR(IVA) option to generate the program information data set. Using the AFFON data set.data sets except for the AFFIN data set. AFFON is an optional run-time control dataset used to specify which program units or portions of program units are to be debugged. The JCL below performs program sampling at the subprogram level on a program running in scalar mode. so as to determine the program "hot spots" where tuning efforts can be applied. IAD has access to all executable statements of all debuggable units. The MVS default for all other VS FORTRAN cataloged procedures is NOSDUMP. or of the DO-loops within a program unit. Program-tuning using IAD In addition to MVS batch mode debugging. LISTSAMP. Program sampling and timing cannot be performed in the same run of the program. 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. By default. //stepname EXEC FORTDCLG //FORT. and ANNOTATE annotates the listing with the sampling counts. code known to be error free can be excluded to run without the debugging overhead. This is done by interrupting the program every several milliseconds and recording where the interruption occurred. IAD can measure the CPU run-time of the program units. ENDDEBUG with the SAMPLE option initiates program sampling. DO-loops and statements. It is used to approximate relative run-times of routines. The Interactive Vectorization Aid (IVA) is a set of IAD functions used to collect information while running vector programs. and ANNOTATE. All program units to be debugged must be compiled with the SDUMP option. Users can measure the results of tuning efforts by timing a routine before and after modification. Both procedures use the compiler option SDUMP and the run-time option DEBUG. Program sampling invocation There are three commands for program sampling: ENDDEBUG. and provide a program listing in addition to debugging output. It enables gathering statistics at the DO-loop level.

and LISTTIME with the DOLOOP option displays the DO-loop timing results.AFFIN DD * VECSTAT SUB1.* //GO. and run with IAD.SYSIN DD * (FORTRAN program) //GO.20:40 ON LISTVEC *. //stepname EXEC FORTDCLG. which are written to a listing file.SYSIN DD * Timing invocation There are three commands for IAD DO-loop timing: TIMER. TIMER with the DOLOOP option turns on DO-loop timing information gathering.* DOLOOP QUIT //GO.FORTOPT='VECTOR(IVA)' //FORT.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. 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 . VECSTAT gathers vector tuning statistics and LISTVEC displays the results.FORTOPT='VECTOR(IVA)' //FORT.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. GO starts program execution. ICA generates only warning messages. //stepname EXEC FORTDCLG. and LISTTIME.LISTSAMP * SUMMARY ANNOTATE * QUIT //GO.AFFIN DD * TIMER *. link-edit.SYSIN DD * (FORTRAN program) //GO. The JCL below performs DOloop timing on a program running in vector mode. It consists of three steps: compile. The JCL below gathers DO-loop length and stride information on lines 20-40 of program unit SUB1 and displays the results. GO.* DOLOOP ON GO LISTTIME *. An external cross reference list is also produced.

9-1978 language level known as FORTRAN 77.ICA invocation To use ICA. 28) SC26-4223. The ICA options are described in the . 2. and additional copies are in the manual racks at the remotes listed in parentheses: GC26-4219. for a list of other translator limitations. The source code must be fixed format with a record length of 80 or 132. the output for the converted source (NEWFORT) is defined on the FT11F001 DD statement as SYSOUT=*. 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. 17. For example. 8. unblocked. 8. in the manual racks at Remotes 1 and 2. See the IBM FORTRAN Translation Tool Program Description/Operation Manual .FORTOPT='ICA' ICA can handle separately compiled source code files by creating and updating the datasets. The minimum virtual storage area required to execute the translator program is two megabytes. compile your program with the ICA option. In the FORTXLAT procedure. VS FORTRAN Version 2 General Information SC26-4221. 28) SC26-4222. The converted code conforms to the ANSI X3. VS FORTRAN Version 2 Language and Library Reference (at Remotes 1. Input requirements Input source to the translator must be error-free in its native dialect. VS FORTRAN Version 2 Programming Guide (at Remotes 1. or VAX TAB format and may be in uppercase and lowercase ASCII or EBCDIC. Debugging statements should be removed in advance as they are not recognizable to the translator and will become comment statements. This produces a hardcopy output listing. the UTCC cataloged procedure FORTXLAT is provided for running the translator program. To store the converted source on a permanent . Execution on MVS On MVS.. 17. 2.us VS FORTRAN Version 2Programming Guide Documentation The following manuals are on reserve in Hodges Library. //stepname EXEC FORTVC.

specify the following parameters on the FT11F001 DD statement (where userid is your CMS logon userid). An example is given below.DEST=(UTKVM1. VSPASLG .FORTXLAT. VSPASCLG. you must specify JCL to allocate a permanent disk data set. If the translated program contains calls to the translator-supplied execution-time routines.DISP=SHR Pascal VS Pascal is a high-level programming language designed for teaching structured computer programming. debug.SPACE=(TRK.FORTXLAT.userid) Executing translated programs Translated programs can normally be executed after compilation and linkage with the VS FORTRAN compiler and subroutine libraries. UNIT=ONLINE. //STEP1 EXEC FORTVCLG //SYSIN DD DSN=Jprojcode.TRANSLIB. in turn. Its objective is to emphasize the importance of well-thought-out program design that.DISP=SHR For those who edit and submit MVS batch JCL from CMS. calls to these routines are resolved at link-edit time by specifying SYS1. An example is given below for a sequential output data set.BLKSIZE=6320) DD DSN=SYS1. a top-down. modular approach to program development.5). VSPASL.DELETE).DISP=(NEW.TRANSLIB as the data set on the link-edit SYSLIB DD statement.MVS disk data set for subsequent modification using the TSO ISPF/PDF editor. //FT11F001 DD SYSOUT=*. makes programs less complex and easier to understand. To do so. you can have the translated output (NEWFORT) returned to your CMS reader where it can then be received and edited with CMS XEDIT.LRECL=80. On MVS.CATLG. //STEP1 //FT11F001 // // //SYSIN EXEC FORTXLAT DD DSN=Jprojcode. VSPASCLD. VSPASCL.NEWFORT. Cataloged procedures Procedures available: VSPASC.(20. and maintain.FORTXLAT.NEWFORT.CNTL(SAMPLES). VSPASLD.SYSLIB DD DSN=SYS1. DCB=(RECFM=FB.DISP=SHR //LKED.RLSE). they must be made available to the translated FORTRAN program (see the manual).

and execute //jobname // /*ROUTE JOB .GROUP=Jprojcode.USER=Pusercode. PASSWORD=? PRINT RMTn //stepname EXEC VSPASCLG .USER=Pusercode.GROUP=Jprojcode. PASSWORD=? PRINT RMTn //stepname EXEC VSPASCLD //SYSIN DD * (Pascal program) //GO.Procedure Step Name Compile Link Edit Execute PASC LKED GO Examples ` Compile and execute //jobname // /*ROUTE JOB . link edit.SYSIN DD * (data) ` Compile.name.name.

UTCC supports two PL/I compilers. demonstrate the versatility of the language. PL/C cataloged procedures .SYSIN DD * (external modules) //GO. See the VS Pascal Application Programming Guide for a full description of compiler options. The Cornell PL/C compiler The PL/C compiler features high compilation speeds. 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. and invocation of the debugging environment. as well as the simplicity of the concepts underlying them. SC26-4319. Documentation The following manuals are available for reference at Remotes 1. The variety of features provided by PL/I. VS Pascal Language Reference PL/I PL/I is a structured programming language suitable for a wide range of programming applications. PL/C allows batching of programs within a job step and requires a minimum region size of 128K. These features make PL/C useful for educational use and initial program checkout. and strict upward compatibility with the optimizing compiler. and 8. good diagnostic assistance.//PASC. and the IBM PL/I Optimizing compiler.SYSIN DD * (data) VS Pascal is also available on the TSO operating system in interactive line mode. 2.SYSIN DD * (Pascal program) //LKED. VS Pascal Application Programming Guide SC26-4320. the PL/C compiler developed at Cornell University. program compilation and execution.

0) on the *PL/C control statement. by specifying ERRORS=(0. These parameters may appear on the *PL/C statement beginning in column seven or after. 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.50). in any order.Procedures available: PLC Procedure Step Name Symbolic Parameters Compile and Execute GO GOREG PL/C control statements Each PL/C program must be preceded by a statement with *PL/C in columns 1-5. it is not possible to obtain an object module in order to avoid compilation on subsequent runs. If the program requires data for execution. The TIME parameter on the JOB statement must be at least one second greater than the TIME parameter on the *PL/C statement. This will permit compilation but inhibit execution. in any combination. the default is 55 seconds. separated by one or more commas or blanks. the second number indicates the number of execution-time errors that will cause execution to be terminated. . If no data is required then the *DATA statement is optional. default is ERRORS=(50. the data must be preceded by a statement with *DATA in columns 1-5.yy) The first number specifies the number of compile errors that will suppress execution. TIME=(mm. Although PL/C is a compiler rather than an interpreter. Some of the parameters are given below with their default values. Execution can be suppressed. ERRORS=(xx. the default is 30 pages.ss) The time in minutes and seconds to which compilation and execution are limited. This statement may also contain specifications of various PL/C parameters to override default specifications built into the system. 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. however. PAGES=nn The maximum number of pages of output to be produced by both compilation and execution.

PASSWORD=? PRINT RMTn PLC * //stepname EXEC //GO.GOREG=512K * //stepname EXEC //GO.GROUP=Jprojcode.name. PASSWORD=? PRINT RMTn LINES=4 PLC.SYSIN DD .USER=Pusercode.name.Examples ` Execute PL/C with batching //jobname // /*ROUTE JOB .SYSIN DD *PL/C (PL/C program) *DATA (data) *PL/C (PL/C program) *DATA (data) ` Execute PL/C with a 512K region and 50 pages of output //jobname // /*ROUTE /*JOBPARM JOB .GROUP=Jprojcode.USER=Pusercode.

PL/I optimizing compiler The PL/I optimizing compiler is designed specifically for the generation of fast object programs. entry variables and new compile time preprocessor facilities.UCS=TN NOTE: The PL/C User's Guide is printed in double column format. LETGO. LKEDOPT. LOADOPT GOOPT. PL1XLD Procedure Compile Link Edit Load Execute Step Names PL1 LKED GO GO Symbolic Parameters OPT. however. GOREG.GUIDE=PLC. LETGO. PL1XCLG.name. PL1XCLD. including the DEFAULT statement. The optimizing compiler has several features that do not exist in earlier PL/I compilers.*PL/C PAGES=50 (PL/C program) *DATA (data) Documentation The following job prints the PL/C User's Guide : //jobname // /*JOBPARM /*ROUTE //stepname JOB . LKEDREG GOOPT. PL1REG GOPGM. Cataloged procedures Procedures available: PL1XC.USER=Pusercode. LETGO . should not be changed. at compile time. PL1OPT. therefore narrow forms must not be requested. PASSWORD=? LINES=9 PRINT RMTn EXEC PRTGUIDE. of fast compilation of a source program or fast execution of the resulting object program. The default form number. file variables. It does. PL1XL.GROUP=Jprojcode. PL1XLG. which specifies greenbar paper. allow the programmer the choice. GOREG. PL1XCL.

USER=Pusercode.GROUP=Jprojcode.MYLIB. and go (with optimizing) //jobname // /*ROUTE JOB .name.GROUP=Jprojcode.SYSIN DD (PL/I program) //GO. Jprojcode.SYSIN DD * (data) ` Compile and link edit a PL/I program and place it as a member of a cataloged partitioned data set.SYSIN DD * (PL/I program) ` Compile. PASSWORD=? PRINT RMTn //stepname EXEC PL1XC //PL1. . load.OPT=2 * //stepname EXEC //PL1. PASSWORD=? PRINT RMTn PL1XCLD.Examples ` Compile (with no optimizing) //jobname // /*ROUTE JOB .name.USER=Pusercode.

INSPECT for C/370 and PL/I: Using INSPECT Under MVS SC26-4529. PASSWORD=? PRINT RMTn //stepname EXEC PL1XCL //PL1. UTCC supports IBM's E-level RPG compiler which requires a 64K region. OS PL/I Version 2 Programming Guide SC26-4308.USER=Pusercode. SC26-4528. and also on MVS under TSO/ISPF in full-screen mode. INSPECT is available on CMS in interactive line mode. monitor.name. generating reports. on MVS in batch mode.SYSLMOD DD DSN=Jprojcode.MYLIB(program_name). and using table lookup. and control execution of programs written in C/370 or PL/I. The following reference manuals are available at Remotes 1 and 8 and in Ayres Room 101. RPG allows exits to subroutines written in a language other than RPG.DISP=OLD Documentation The following manuals are on reserve in Hodges Library.SYSIN DD * (PL/I program) //LKED. SC26-4307. 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.GROUP=Jprojcode. INSPECT for C/370 and PL/I: Using INSPECT Under CMS RPG (Report Program Generator) RPG is a problem-oriented language for maintaining and manipulating files. Cataloged procedures .//jobname // /*ROUTE JOB .

LETGO Example ` Compile.file1 DD //GO. RPGECLD. RPGECL.USER=Pusercode. load. GOREG.GROUP=Jprojcode. LOADOPT Execute GO GOOPT.name. and go //jobname // /*ROUTE JOB .SYSIN DD (RPG program) //GO. LKEDREG Load GO GOOPT. RPGELD Procedure Step Names Symbolic Parameters Compile RPG RPGOPT. LETGO. GOREG. RPGELG.file2 DD * (data) SYSOUT=* * . RPGEL. RPGECLG.Procedures available: RPGEC. PASSWORD=? PRINT RMTn //stepname EXEC RPGECLD //RPG. LKEDOPT. RPGREG Link Edit LKED GOPGM.

SPITBOL is smaller than the original implementation of SNOBOL4 (128K vs 192K) and has execution speeds of up to 10 times faster. SPITLKED Procedures Step Name Symbolic Parameters Compile and Execute SPITBOL SPITREG. Cataloged procedures Procedures available: SPITBOL.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. written at Illinois Institute of Technology. some incompatibilities between SNOBOL4 and SPITBOL. SPITOPT Compile and Create Load Module SPITOBJ SPITREG. There are. Documentation GC24-3337. however. SPITOPT . The implementation available at UTCC is SPITBOL. OS/360 RPG Language Specifications SPITBOL The SNOBOL4 programming language is a string-manipulation and list-processing language developed at Bell Laboratories. SPITOBJ.

GROUP=Jprojcode. and C is the number of card images generated. SPITOPT Default Values for Symbolic Parameters The default values for the symbolic parameters are SPITREG=128K SPITOPT='T=55.USER=Pusercode. It should be noted.name. will override any values for the symbolic parameters. however.P=1000000.USER=Pusercode.GROUP=Jprojcode. whether coded or default.C=1000000' where T is the CPU time in seconds. . P is the number of pages of printed output for compilation and execution.name. PASSWORD=? PRINT RMTn //stepname EXEC SPITBOL //SYSIN DD * (SPITBOL program and data) ` Execute SPITBOL using symbolic parameters //jobname JOB . that the parameters on the JOB and JOBPARM statements. Examples ` Execute SPITBOL //jobname // /*ROUTE JOB .Link Edit and Execute SPITLKED SPITREG.

// /*ROUTE PASSWORD=? PRINT RMTn //stepname EXEC SPITBOL. PRINT RMTn EXEC SPITOBJ DD * (SPITBOL program) .USER=Pusercode.Pusercode.GROUP=Jprojcode.SPITREG=128K.libname with one member named 'PGM1' //jobname /*ROUTE //STEP2 //SYSIN -NOEXECUTE JOB .GROUP=Jprojcode.C=0' //SYSIN DD * (SPITBOL program and data) ` Execute SPITBOL with batching //jobname // /*ROUTE JOB .USER=Pusercode.name.name.SPITOPT='P=30. PASSWORD=? PRINT RMTn //stepname EXEC SPITBOL //SYSIN DD * (SPITBOL program 1 and data) (SPITBOL program 2 and data) (SPITBOL program 3 and data) ` Create a load module library called Jprojcode.

SYSLMOD DD DSN=Jprojcode.libname //jobname // /*ROUTE //STEP3 //STEPLIB JOB .REGION=96K DD DSN=Jprojcode.GROUP=Jprojcode. and Polonsky. PASSWORD=? PRINT RMTn EXEC PGM=PGM1.1). The loader creates a load module in main storage.3.USER=Pusercode.//LKED.SPACE=(6160. A SNOBOL4 Primer Illinois Institute of Technology.RLSE). Poage. SPITBOL Version 2.CATLG).name.SYSIN DD * NAME PGM1 ` Execute the SPITBOL program 'PGM1' from the load module library Jprojcode.Pusercode. // // DISP=(NEW.(9. ready for .libname.Pusercode.libname.Pusercode. The linkage editor creates a copy of a program in the form of a load module on disk.DISP=SHR //SYSPRINT DD SYSOUT=* //SYSIN (data) DD * Documentation Griswold.0 Linkage editor and loader The data processed by the linkage editor and loader is the output from a compiler. UNIT=ONLINE //LKED. The SNOBOL4 Programming Language Griswold and Griswold. The load module may be executed as a subsequent step in the same job or in another job at some later time.

GOREG Example ` Link edit and create a load module named MLOAD.USER=Pusercode. PASSWORD=? PRINT RMTn //stepname EXEC LKED . There are a few procedures which use the linkage editor or loader alone rather than in conjunction with a compiler. the loader does not have some of the more advanced features of the linkage editor. Steps invoking the linkage editor or loader are a part of the standard cataloged procedures for the compilers.immediate execution.name. //jobname // /*ROUTE JOB .GROUP=Jprojcode. Also. LKEDREG Execute GO GOOPT. add it to an existing load library. However. at execution time it occupies a significant amount of main storage that might otherwise be used for the user's program.libname. No libraries are included in these procedures. Jprojcode. replacing any previously existing load module with the same name in that library. Linkage editor cataloged procedures Procedures available: LKED. LKEDG Procedure Step Name Symbolic Parameters Link Edit LKED LKEDOPT.

SYSLDIN DD DSN=Jprojcode.KEEP). is available under the MVS operating system running on the IBM 3090 processors.SYSLMOD DD DISP=(OLD.SYSIN DD * (object code) NAME MLOAD(R) Loader cataloged procedures Procedures available: GO. GOOPT Example ` Load and Go //jobname // /*ROUTE JOB . Abend-AID analyzes program abends (abnormal endings). . Abend-AID transfers the manual task of analyzing program abends from the programmer to the computer.DISP=SHR //GO. LOADG. Abend-AID/COBOL.GROUP=Jprojcode.SYSIN DD * (data) Abend-AID Abend-AID.USER=Pusercode. LOADGO Procedure Step Name Symbolic Parameters Load GO LOADOPT. PASSWORD=? PRINT RMTn //stepname EXEC GO //GO. // DSNAME=Jprojcode. which includes OS Abend-AID. An operating system enhancement. Abend-AID tells WHAT.myobject.libname //LKED.//LKED. and AbendAID/ONLINE.name.

Abend/AID then returns control to the PL/I library for orderly termination of the PL/I environment. and identifies compiler errors at the source statement. If required. Abend-AID/COBOL produces more efficient program listings. include the //ABNLNODP DD DUMMY statement within the job step. Abend-AID allows a normal IBM dump to occur. To shut off Abend-AID allowing a normal IBM dump. provides symbolic name contents of the field in error. displays working-storage by symbolic field name. and WHY the abend happened. To force an IBM dump in addition to the Abend-AID output. It interfaces to the SNAPAID module which takes a SNAPDUMP of the program error and prints information regarding the PL/I error. An example of this is when important parts of program storage have been destroyed and a complete analysis is not possible. All the information is provided on three or four pages. suppressing the printing of superfluous control blocks. In the debugging environment. AbendAID/COBOL identifies the exact source statement causing the abend. Valid modes are IGYCRCTL.) Additional COBOL support Abend-AID/COBOL is a compiler enhancement that extends the debugging capability of basic Abend-AID. automatically documents record layouts. 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. calculates data element positions in decimal. In some instances. (A hook for PLIDUMP is not used in this support. To suppress printing of the IBM dump in the event Abend-AID is unable to diagnose the problem. include the //ABNLDUMP DD DUMMY statement within the job step. which invokes the COBOL compiler without COBOLAID. users can override the default actions of Abend-AID at the job step level. etc. Abend-AID/COBOL is invoked by specifying MODE=COBOLAID on the EXEC statement. the default. To invoke the Abend-AID "on code" analysis report. Its main objectives are reducing costs and improving programmer productivity. In the compile environment. Additional PL/I support Non-Abending PL/I programming language support provides "hooks" to the PL/I file close and library termination routines. and traces program calls by statement number. include an //ABENDAID DD statement in the GO step. However. VS COBOL II UTCC procedures (procs) include the symbolic parameter MODE. displays current in record layout format. and a PL/I dump will be produced if a PLIDUMP DD statement is present in the JCL stream. include the //ABNLIGNR DD DUMMY statement within the job step.WHERE. Abend-AID intercepts the abend before the IBM dump is triggered. and COBOLAID . Abend-AID invocation Abend-AID processing is enabled by installation default for all jobs which abend. a call to PLIDUMP will invoke the PL/I support. Abend-AID provides only the appropriate output necessary for the programmer to fix the abending program.

optional Abend-AID DD statements is shown below. To invoke Snap-AID. The pseudo abend code is reported as SNAP.MVS. The page titles indicate an Abend-AID Snapshot. 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. Abend-AID DD statements A list from the OS Abend-AID Installation and Reference Manual of valid. the DD DUMMY statement is required in the GO step. include an ABNLWIDE DD DUMMY statement within the job step. 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 . the last one encountered will be the one that takes effect. It is invoked by a subroutine call to the module SNAPAID. Snap-AID Snap-AID is the Abend-AID Snap Dump Facility which prints working storage and file information without abending. If two mutually exclusive DD statements are present in the JCL. To force 121 column output. This is the default.which invokes Abend-AID/COBOL. COBOL programmers not using the DYNAM option. and other language programmers will need to include UNT1.LINKLIBP in the SYSLIB DD statement for their or code a linkage editor INCLUDE statement for the SNAPAID subroutine module. These statements can be used within job steps to override Abend-AID default settings.

Abend-AID will not write to SYSMDUMP.SYSMDUMP must use the ABENDAID DD to get Abend-AID output.) //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 Suppresses W-level message in the body of the Abend-AID/COBOL source listing //ABNLTERM DD SYSOUT=* Invokes the Abend-AID/ONLINE feature for 72-column output when 121-column output is the default //ABNLTERM DD DSN= Specifies an Abend-AID dump data set for Abend-AID output //ABNLWIDE DD DUMMY Allows 121-column output when the default is 72 columns //ABNLWSPT DD DUMMY Forces printing of the Abend-AID program storage section [ Top of Page | Previous Page | Next Page | Table of Contents ] .

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->