CL Programming


Using CL Procedures

CL programming is a flexible tool allowing you to perform a variety of operations. Each of the following uses is described in greater detail in individual sections later in this chapter. In general, you can:


Control processing among procedures and programs and pass parameters from a CL procedure to other procedures or programs to override files.

Used as a controlling procedure, a CL procedure can call procedures written in other languages. The following illustration shows how control can be passed between a CL procedure and RPG IV* and ILE COBOL procedures in an application. To use the application, a work station user would request program A, which controls the entire application. The illustration shows: The preceding example shows a single bound program (PGMA) that is called using the CALL command with PGMA. PGMA consists of:


The following illustration shows how control can be passed between a CL procedure and RPG IV* and ILE COBOL procedures in an application.

The procedures can be created as indicated in the following example. You can enter source for procedures in separate source members.

    CRTCLMOD PGMA
    CRTRPGMOD PGMB
    CRTRPGMOD PGMC
    CRTCLMOD PGMD
    CRTCBLMOD PGME
    CRTCLMOD PGMF
    CRTPGM PGM(PGMA) +
           MODULE(PGMA PGMB PGMC PGMD PGME PGMF) +
           ENTMOD(*FIRST)


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]