Category: Subroutines

  • Questions and Answers

    COBOL Questions and Answers has been designed with a special intention of helping students and professionals preparing for various Certification Exams and Job Interviews. This section provides a useful collection of sample Interview Questions and Multiple Choice Questions (MCQs) and their answers with appropriate explanations.

    Questions and Answers
    SNQuestion/Answers Type
    1COBOL Interview QuestionsThis section provides a huge collection of COBOL Interview Questions with their answers hidden in a box to challenge you to have a go at them before discovering the correct answer.
    2COBOL Online QuizThis section provides a great collection of COBOL Multiple Choice Questions (MCQs) on a single page along with their correct answers and explanation. If you select the right option, it turns green; else red.
    3COBOL Online TestIf you are preparing to appear for a Java and COBOL Framework related certification exam, then this section is a must for you. This section simulates a real online test along with a given timer which challenges you to complete the test within a given time-frame. Finally you can check your overall test score and how you fared among millions of other candidates who attended this online test.
    4COBOL Mock TestThis section provides various mock tests that you can download at your local machine and solve offline. Every mock test is supplied with a mock test key to let you verify the final score and grade yourself.

  • Database Interface

    As of now, we have learnt the use of files in COBOL. Now, we will discuss how a COBOL program interacts with DB2. It involves the following terms −

    • Embedded SQL
    • DB2 Application Programming
    • Host Variables
    • SQLCA
    • SQL Queries
    • Cursors

    Embedded SQL

    Embedded SQL statements are used in COBOL programs to perform standard SQL operations. Embedded SQL statements are preprocessed by the SQL processor before the application program is compiled. COBOL is known as the Host Language. COBOL-DB2 applications are those applications that include both COBOL and DB2.

    Embedded SQL statements work like normal SQL statements with some minor changes. For example, the output of a query is directed to a predefined set of variables which are referred as Host Variables. An additional INTO clause is placed in the SELECT statement.

    DB2 Application Programming

    Following are rules to be followed while coding a COBOL-DB2 program −

    • All the SQL statements must be delimited between EXEC SQL and ENDEXEC..
    • SQL statements must be coded in Area B.
    • All the tables that are used in a program must be declared in the WorkingStorage Section. This is done by using the INCLUDE statement.
    • All SQL statements other than INCLUDE and DECLARE TABLE must appear in the Procedure Division.

    Host Variables

    Host variables are used for receiving data from a table or inserting data in a table. Host variables must be declared for all values that are to be passed between the program and the DB2. They are declared in the Working-Storage Section.

    Host variables cannot be group items, but they may be grouped together in host structure. They cannot be Renamed or Redefined. Using host variables with SQL statements, prefix them with a colon (:)..

    Syntax

    Following is the syntax to declare host variables and include tables in the Working-Storage section −

    DATADIVISION.WORKING-STORAGESECTION.
       
       EXEC SQL
       INCLUDE table-name
       END-EXEC.
    
       EXEC SQL BEGIN DECLARE SECTION
       END-EXEC.01 STUDENT-REC.05 STUDENT-ID PIC9(4).05 STUDENT-NAME PICX(25).05 STUDENT-ADDRESS X(50).
       EXEC SQL END DECLARE SECTION
       END-EXEC.

    SQLCA

    SQLCA is a SQL communication area through which DB2 passes the feedback of SQL execution to the program. It tells the program whether an execution was successful or not. There are a number of predefined variables under SQLCA like SQLCODE which contains the error code. The value ‘000’ in SQLCODE states a successful execution.

    Syntax

    Following is the syntax to declare an SQLCA in the Working-Storage section −

    DATA DIVISION.
    WORKING-STORAGE SECTION.
    	EXEC SQL
    	INCLUDE SQLCA
    	END-EXEC.
    

    SQL Queries

    Lets assume we have one table named as ‘Student’ that contains Student-Id, Student-Name, and Student-Address.

    The STUDENT table contains the following data −

    Student Id		Student Name		Student Address
    1001 			   Mohtashim M.		Hyderabad
    1002			   Nishant Malik		Delhi
    1003 			   Amitabh Bachan		Mumbai
    1004			   Chulbul Pandey		Lucknow
    

    The following example shows the usage of SELECT query in a COBOL program −

    IDENTIFICATIONDIVISION.PROGRAM-ID. HELLO.DATADIVISION.WORKING-STORAGESECTION.
       EXEC SQL
    
      INCLUDE SQLCA
    END-EXEC. EXEC SQL
      INCLUDE STUDENT
    END-EXEC. EXEC SQL BEGIN DECLARE SECTION END-EXEC.01 WS-STUDENT-REC.05 WS-STUDENT-ID PIC9(4).05 WS-STUDENT-NAME PICX(25).05 WS-STUDENT-ADDRESS X(50). EXEC SQL END DECLARE SECTION END-EXEC.PROCEDUREDIVISION. EXEC SQL
      SELECT STUDENT-ID, STUDENT-NAME, STUDENT-ADDRESS
      INTO:WS-STUDENT-ID,:WS-STUDENT-NAME, WS-STUDENT-ADDRESS FROM STUDENT
      WHERE STUDENT-ID=1004
    END-EXEC.IF SQLCODE =0DISPLAY WS-STUDENT-RECORD ELSEDISPLAY'Error'END-IF.STOPRUN.

    JCL to execute the above COBOL program −

    //SAMPLE JOB(TESTJCL,XXXXXX),CLASS= A,MSGCLASS = C
    //STEP001  EXEC PGM = IKJEFT01
    //STEPLIB  DD DSN = MYDATA.URMI.DBRMLIB,DISP = SHR
    //SYSPRINT DD SYSOUT=*//SYSUDUMP DD SYSOUT=*//SYSOUT   DD SYSOUT=*//SYSTSIN  DD *
       DSN SYSTEM(SSID)RUNPROGRAM(HELLO) PLAN(PLANNAME)-END/*

    When you compile and execute the above program, it produces the following result −

    1004 Chulbul Pandey		Lucknow
    

    The following example shows the usage of INSERT query in a COBOL program −

    IDENTIFICATIONDIVISION.PROGRAM-ID. HELLO.DATADIVISION.WORKING-STORAGESECTION.
       EXEC SQL
       INCLUDE SQLCA
       END-EXEC.
       
       EXEC SQL
       INCLUDE STUDENT
       END-EXEC.
       
       EXEC SQL BEGIN DECLARE SECTION
       END-EXEC.01 WS-STUDENT-REC.05 WS-STUDENT-ID PIC9(4).05 WS-STUDENT-NAME PICX(25).05 WS-STUDENT-ADDRESS X(50).
       EXEC SQL END DECLARE SECTION
       END-EXEC.PROCEDUREDIVISION.MOVE1005TO WS-STUDENT-ID.MOVE'TutorialsPoint'TO WS-STUDENT-NAME.MOVE'Hyderabad'TO WS-STUDENT-ADDRESS.
       
       EXEC SQL
    
      INSERT INTO STUDENT(STUDENT-ID, STUDENT-NAME, STUDENT-ADDRESS)VALUES(:WS-STUDENT-ID,:WS-STUDENT-NAME, WS-STUDENT-ADDRESS)
    END-EXEC.IF SQLCODE =0DISPLAY'Record Inserted Successfully'DISPLAY WS-STUDENT-REC ELSEDISPLAY'Error'END-IF.STOPRUN.

    JCL to execute the above COBOL program −

    //SAMPLE JOB(TESTJCL,XXXXXX),CLASS= A,MSGCLASS = C
    //STEP001  EXEC PGM = IKJEFT01
    //STEPLIB  DD DSN = MYDATA.URMI.DBRMLIB,DISP=SHR
    //SYSPRINT DD SYSOUT =*//SYSUDUMP DD SYSOUT =*//SYSOUT   DD SYSOUT =*//SYSTSIN  DD *
       DSN SYSTEM(SSID)RUNPROGRAM(HELLO) PLAN(PLANNAME)-END/*

    When you compile and execute the above program, it produces the following result −

    Record Inserted Successfully
    1005 TutorialsPoint		Hyderabad
    

    The following example shows the usage of UPDATE query in a COBOL program −

    IDENTIFICATIONDIVISION.PROGRAM-ID. HELLO.DATADIVISION.WORKING-STORAGESECTION.
       
       EXEC SQL
       INCLUDE SQLCA
       END-EXEC.
       
       EXEC SQL
       INCLUDE STUDENT
       END-EXEC.
       
       EXEC SQL BEGIN DECLARE SECTION
       END-EXEC.01 WS-STUDENT-REC.05 WS-STUDENT-ID PIC9(4).05 WS-STUDENT-NAME PICX(25).05 WS-STUDENT-ADDRESS X(50).
       EXEC SQL END DECLARE SECTION
       END-EXEC.PROCEDUREDIVISION.MOVE'Bangalore'TO WS-STUDENT-ADDRESS.
       EXEC SQL
    
      UPDATE STUDENT SET STUDENT-ADDRESS=:WS-STUDENT-ADDRESS
      WHERE STUDENT-ID =1003
    END-EXEC.IF SQLCODE =0DISPLAY'Record Updated Successfully'ELSEDISPLAY'Error'END-IF.STOPRUN.

    JCL to execute the above COBOL program −

    //SAMPLE JOB(TESTJCL,XXXXXX),CLASS= A,MSGCLASS = C
    //STEP001  EXEC PGM = IKJEFT01
    //STEPLIB  DD DSN = MYDATA.URMI.DBRMLIB,DISP = SHR
    //SYSPRINT DD SYSOUT =*//SYSUDUMP DD SYSOUT =*//SYSOUT   DD SYSOUT =*//SYSTSIN  DD *
       DSN SYSTEM(SSID)RUNPROGRAM(HELLO) PLAN(PLANNAME)-END/*

    When you compile and execute the above program, it produces the following result −

    Record Updated Successfully
    

    The following example shows the usage of DELETE query in a COBOL program −

    IDENTIFICATIONDIVISION.PROGRAM-ID. HELLO.DATADIVISION.WORKING-STORAGESECTION.
    
       EXEC SQL
       INCLUDE SQLCA
       END-EXEC.
       
       EXEC SQL
       INCLUDE STUDENT
       END-EXEC.
       
       EXEC SQL BEGIN DECLARE SECTION
       END-EXEC.01 WS-STUDENT-REC.05 WS-STUDENT-ID PIC9(4).05 WS-STUDENT-NAME PICX(25).05 WS-STUDENT-ADDRESS X(50).
       EXEC SQL END DECLARE SECTION
       END-EXEC.PROCEDUREDIVISION.MOVE1005TO WS-STUDENT-ID.
       
       EXEC SQL
    
      DELETEFROM STUDENT
      WHERE STUDENT-ID=:WS-STUDENT-ID
    END-EXEC.IF SQLCODE =0DISPLAY'Record Deleted Successfully'ELSEDISPLAY'Error'END-IF.STOPRUN.

    JCL to execute the above COBOL program −

    //SAMPLE JOB(TESTJCL,XXXXXX),CLASS= A,MSGCLASS = C
    //STEP001  EXEC PGM = IKJEFT01
    //STEPLIB  DD DSN = MYDATA.URMI.DBRMLIB,DISP=SHR
    //SYSPRINT DD SYSOUT =*//SYSUDUMP DD SYSOUT =*//SYSOUT   DD SYSOUT =*//SYSTSIN  DD *
       DSN SYSTEM(SSID)RUNPROGRAM(HELLO) PLAN(PLANNAME)-END/*

    When you compile and execute the above program, it produces the following result −

    Record Deleted Successfully
    

    Cursors

    Cursors are used to handle multiple row selections at a time. They are data structures that hold all the results of a query. They can be defined in the Working-Storage Section or the Procedure Division. Following are the operations associated with Cursor −

    • Declare
    • Open
    • Close
    • Fetch

    Declare Cursor

    Cursor declaration can be done in the Working-Storage Section or the Procedure Division. The first statement is the DECLARE statement which is a nonexecutable statement.

    EXEC SQL
       DECLARE STUDCUR CURSORFORSELECT STUDENT-ID, STUDENT-NAME, STUDENT-ADDRESS FROM STUDENT
       WHERE STUDENT-ID >:WS-STUDENT-ID
    END-EXEC.

    Open

    Before using a cursor, Open statement must be performed. The Open statement prepares the SELECT for execution.

    EXEC SQL
       OPEN STUDCUR
    END-EXEC.

    Close

    Close statement releases all the memory occupied by the cursor. It is mandatory to close a cursor before ending a program.

    EXEC SQL
       CLOSE STUDCUR
    END-EXEC.

    Fetch

    Fetch statement identifies the cursor and puts the value in the INTO clause. A Fetch statement is coded in loop as we get one row at a time.

    EXEC SQL
       FETCH STUDCUR
       INTO:WS-STUDENT-ID,:WS-STUDENT-NAME, WS-STUDENT-ADDRESS
    END-EXEC.

    The following example shows the usage of cursor to fetch all the records from the STUDENT table −

    IDENTIFICATIONDIVISION.PROGRAM-ID. HELLO.DATADIVISION.WORKING-STORAGESECTION.
       
       EXEC SQL
       INCLUDE SQLCA
       END-EXEC.
       
       EXEC SQL
       INCLUDE STUDENT
       END-EXEC.
       
       EXEC SQL BEGIN DECLARE SECTION
       END-EXEC.01 WS-STUDENT-REC.05 WS-STUDENT-ID PIC9(4).05 WS-STUDENT-NAME PICX(25).05 WS-STUDENT-ADDRESS X(50).
       EXEC SQL END DECLARE SECTION
       END-EXEC.
       
       EXEC SQL
    
      DECLARE STUDCUR CURSORFORSELECT STUDENT-ID, STUDENT-NAME, STUDENT-ADDRESS FROM STUDENT
      WHERE STUDENT-ID >:WS-STUDENT-ID
    END-EXEC.PROCEDUREDIVISION.MOVE1001TO WS-STUDENT-ID.PERFORMUNTIL SQLCODE =100 EXEC SQL
      FETCH STUDCUR
      INTO:WS-STUDENT-ID,:WS-STUDENT-NAME, WS-STUDENT-ADDRESS
    END-EXEC DISPLAY WS-STUDENT-REC END-PERFORMSTOPRUN.

    JCL to execute the above COBOL program −

    //SAMPLE JOB(TESTJCL,XXXXXX),CLASS= A,MSGCLASS = C
    //STEP001  EXEC PGM=IKJEFT01
    //STEPLIB  DD DSN=MYDATA.URMI.DBRMLIB,DISP=SHR
    //SYSPRINT DD SYSOUT=*//SYSUDUMP DD SYSOUT=*//SYSOUT   DD SYSOUT=*//SYSTSIN  DD *
       DSN SYSTEM(SSID)RUNPROGRAM(HELLO) PLAN(PLANNAME)-END/*

    When you compile and execute the above program, it produces the following result −

    1001 Mohtashim M.		Hyderabad
    1002 Nishant Malik		Delhi
    1003 Amitabh Bachan		Mumbai
    1004 Chulbul Pandey		Lucknow
  • Internal Sort

    Sorting of data in a file or merging of two or more files is a common necessity in almost all business-oriented applications. Sorting is used for arranging records either in ascending or descending order, so that sequential processing can be performed. There are two techniques which are used for sorting files in COBOL −

    • External sort is used to sort files by using the SORT utility in JCL. We have discussed this in the JCL chapter. As of now, we will focus on internal sort.
    • Internal sort is used to sort files within a COBOL program. SORT verb is used to sort a file.

    Sort Verb

    Three files are used in the sort process in COBOL −

    • Input file is the file which we have to sort either in ascending or descending order.
    • Work file is used to hold records while the sort process is in progress. Input file records are transferred to the work file for the sorting process. This file should be defined in the File-Section under SD entry.
    • Output file is the file which we get after the sorting process. It is the final output of the Sort verb.

    Syntax

    Following is the syntax to sort a file −

    SORT work-file ON ASCENDING KEY rec-key1
       [ON DESCENDING KEY rec-key2]
    USING input-file GIVING output-file.
    

    SORT performs the following operations −

    • Opens work-file in I-O mode, input-file in the INPUT mode and output-file in the OUTPUT mode.
    • Transfers the records present in the input-file to the work-file.
    • Sorts the SORT-FILE in ascending/descending sequence by rec-key.
    • Transfers the sorted records from the work-file to the output-file.
    • Closes the input-file and the output-file and deletes the work-file.

    Example

    In the following example, INPUT is the input file which needs to be sorted in ascending order −

    IDENTIFICATIONDIVISION.PROGRAM-ID. HELLO.ENVIRONMENTDIVISION.INPUT-OUTPUTSECTION.FILE-CONTROL.SELECTINPUTASSIGNTOIN.SELECTOUTPUTASSIGNTO OUT.SELECT WORK ASSIGNTO WRK.DATADIVISION.FILESECTION.FDINPUT.01 INPUT-STUDENT.05 STUDENT-ID-I PIC9(5).05 STUDENT-NAME-I PICA(25).FDOUTPUT.01 OUTPUT-STUDENT.05 STUDENT-ID-O PIC9(5).05 STUDENT-NAME-O PICA(25).SD WORK.01 WORK-STUDENT.05 STUDENT-ID-W PIC9(5).05 STUDENT-NAME-W PICA(25).PROCEDUREDIVISION.SORT WORK ONASCENDINGKEY STUDENT-ID-O
       USINGINPUTGIVINGOUTPUT.DISPLAY'Sort Successful'.STOPRUN.

    JCL to execute the above COBOL program −

    //SAMPLE JOB(TESTJCL,XXXXXX),CLASS= A,MSGCLASS = C
    //STEP1 EXEC PGM = HELLO
    //IN DD DSN = INPUT-FILE-NAME,DISP = SHR
    //OUT DD DSN = OUTPUT-FILE-NAME,DISP = SHR
    //WRK DD DSN =&&TEMP
    

    When you compile and execute the above program, it produces the following result −

    Sort Successful
    

    Merge Verb

    Two or more identically sequenced files are combined using Merge statement. Files used in the merge process −

    • Input Files − Input-1, Input-2
    • Work File
    • Output File

    Syntax

    Following is the syntax to merge two or more files −

    MERGE work-file ONASCENDINGKEY rec-key1
       [ONDESCENDINGKEY rec-key2]
    
    USING input-1, input-2 GIVING output-file.

    Merge performs the following operations −

    • Opens the work-file in I-O mode, input-files in the INPUT mode and output-file in the OUTPUT mode.
    • Transfers the records present in the input-files to the work-file.
    • Sorts the SORT-FILE in ascending/descending sequence by rec-key.
    • Transfers the sorted records from the work-file to the output-file.
    • Closes the input-file and the output-file and deletes the work-file.

    Example

    In the following example, INPUT1 and INPUT2 are the input files which are to be merged in ascending order −

    IDENTIFICATIONDIVISION.PROGRAM-ID. HELLO.ENVIRONMENTDIVISION.INPUT-OUTPUTSECTION.FILE-CONTROL.SELECT INPUT1 ASSIGNTO IN1.SELECT INPUT2 ASSIGNTO IN2.SELECTOUTPUTASSIGNTO OUT.SELECT WORK ASSIGNTO WRK.DATADIVISION.FILESECTION.FD INPUT1.01 INPUT1-STUDENT.05 STUDENT-ID-I1 PIC9(5).05 STUDENT-NAME-I1 PICA(25).FD INPUT2.01 INPUT2-STUDENT.05 STUDENT-ID-I2 PIC9(5).05 STUDENT-NAME-I2 PICA(25).FDOUTPUT.01 OUTPUT-STUDENT.05 STUDENT-ID-O PIC9(5).05 STUDENT-NAME-O PICA(25).SD WORK.01 WORK-STUDENT.05 STUDENT-ID-W PIC9(5).05 STUDENT-NAME-W PICA(25).PROCEDUREDIVISION.MERGE WORK ONASCENDINGKEY STUDENT-ID-O
       USING INPUT1, INPUT2 GIVINGOUTPUT.DISPLAY'Merge Successful'.STOPRUN.

    JCL to execute the above COBOL program −

    //SAMPLE JOB(TESTJCL,XXXXXX),CLASS= A,MSGCLASS = C
    //STEP1 EXEC PGM = HELLO
    //IN1 DD DSN=INPUT1-FILE-NAME,DISP=SHR
    //IN2 DD DSN=INPUT2-FILE-NAME,DISP=SHR
    //OUT DD DSN = OUTPUT-FILE-NAME,DISP=SHR
    //WRK DD DSN =&&TEMP
    

    When you compile and execute the above program, it produces the following result −

    Merge Successful
    

  • Subroutines

    Cobol subroutine is a program that can be compiled independently but cannot be executed independently. There are two types of subroutines: internal subroutines like Perform statements and external subroutines like CALL verb.

    Call Verb

    Call verb is used to transfer the control from one program to another program. The program that contains the CALL verb is the Calling Program and the program being called is known as the Called Program. Calling program execution will halt until the called program finishes the execution. Exit Program statement is used in the Called program to transfer the control back.

    Called Program Constraints

    Following are the called program requirements −

    • Linkage section must be defined in the called program. It consists of data elements passed in the program. The data items should not have Value clause. PIC clause must be compatible with the variables passed through the calling program.
    • Procedure division using has a list of variables passed from the calling program and the order must be same as mentioned in the Call verb.
    • Exit program statement is used in the called program to transfer the control back. It must be the last statement in the called program.

    The parameters can be passed between programs in two ways −

    • By Reference
    • By Content

    Call By Reference

    If the values of variables in the called program are modified, then their new values will reflect in the calling program. If BY clause is not specified, then variables are always passed by reference.

    Syntax

    Following is the syntax of calling subroutine by reference −

    CALL sub-prog-name USING variable-1, variable-2.
    

    Example

    Following example is the MAIN calling program and UTIL is the called program −

    IDENTIFICATIONDIVISION.PROGRAM-ID. MAIN.DATADIVISION.WORKING-STORAGESECTION.01 WS-STUDENT-ID PIC9(4)VALUE1000.01 WS-STUDENT-NAME PICA(15)VALUE'Tim'.PROCEDUREDIVISION.CALL'UTIL'USING WS-STUDENT-ID, WS-STUDENT-NAME.DISPLAY'Student Id : ' WS-STUDENT-ID
       DISPLAY'Student Name : ' WS-STUDENT-NAME
    STOPRUN.

    Called Program

    IDENTIFICATIONDIVISION.PROGRAM-ID. UTIL.DATADIVISION.LINKAGESECTION.01 LS-STUDENT-ID PIC9(4).01 LS-STUDENT-NAME PICA(15).PROCEDUREDIVISIONUSING LS-STUDENT-ID, LS-STUDENT-NAME.DISPLAY'In Called Program'.MOVE1111TO LS-STUDENT-ID.EXITPROGRAM.

    JCL to execute the above COBOL program −

    //SAMPLE JOB(TESTJCL,XXXXXX),CLASS= A,MSGCLASS = C
    //STEP1 EXEC PGM = MAIN
    

    When you compile and execute the above program, it produces the following result −

    In Called Program
    Student Id : 1111
    Student Name : Tim
    

    Call By Content

    If the values of variables in the called program are modified, then their new values will not reflect in the calling program.

    Syntax

    Following is the syntax of calling subroutine by content −

    CALL sub-prog-name USING 
    BY CONTENT variable-1, BY CONTENT variable-2.
    

    Example

    Following example is the MAIN calling program and UTIL is the called program −

    IDENTIFICATIONDIVISION.PROGRAM-ID. MAIN.DATADIVISION.WORKING-STORAGESECTION.01 WS-STUDENT-ID PIC9(4)VALUE1000.01 WS-STUDENT-NAME PICA(15)VALUE'Tim'.PROCEDUREDIVISION.CALL'UTIL'USINGBYCONTENT WS-STUDENT-ID,BYCONTENT WS-STUDENT-NAME.DISPLAY'Student Id : ' WS-STUDENT-ID
       DISPLAY'Student Name : ' WS-STUDENT-NAME
    STOPRUN.

    Called Program

    IDENTIFICATIONDIVISION.PROGRAM-ID. UTIL.DATADIVISION.LINKAGESECTION.01 LS-STUDENT-ID PIC9(4).01 LS-STUDENT-NAME PICA(15).PROCEDUREDIVISIONUSING LS-STUDENT-ID, LS-STUDENT-NAME.DISPLAY'In Called Program'.MOVE1111TO LS-STUDENT-ID.EXITPROGRAM.

    JCL to execute the above COBOL program −

    //SAMPLE JOB(TESTJCL,XXXXXX),CLASS= A,MSGCLASS = C
    //STEP1 EXEC PGM = MAIN
    

    When you compile and execute the above program, it produces the following result −

    In Called Program
    Student Id : 1000
    Student Name : Tim
    

    Types of Call

    There are two types of calls −

    • Static Call occurs when a program is compiled with the NODYNAM compiler option. A static called program is loaded into storage at compile time.
    • Dynamic Call occurs when a program is compiled with the DYNAM and NODLL compiler option. A dynamic called program is loaded into storage at runtime.