ILE COBOL Programmer's Guide


Example of Entering Source Statements into a Source Member

This example shows you how to create a library and source physical file, start an edit session, and enter source statements using the Create Library (CRTLIB), Create Source Physical File (CRTSRCPF) and Start SEU (STRSEU) commands.

Note:
In order to perform these tasks using these commands you must first have the authority to use the commands.
  1. To create a library called MYLIB, type
    CRTLIB LIB(MYLIB)
    

    and press Enter.

    The CRTLIB command creates a library named MYLIB.

  2. To create a source physical file called QCBLLESRC, type
    CRTSRCPF FILE(MYLIB/QCBLLESRC)
    TEXT ('Source physical file for an ILE COBOL for iSeries program')
    

    and press Enter.

    The CRTSRCPF command creates a source physical file named QCBLLESRC in library MYLIB.

  3. To start an edit session and create a source physical file member XMPLE1, type
    STRSEU SRCFILE(MYLIB/QCBLLESRC) SRCMBR(XMPLE1)
    TYPE(CBLLE) OPTION(2)
    

    and press Enter.

    The STRSEU command creates a new member XMPLE1 in file QCBLLESRC in library MYLIB.

    The SEU Edit display appears as shown in Figure 6.

    Figure 6. Edit Display for a New Member

    +--------------------------------------------------------------------------------+
    |Columns . . . :    1  71            Edit                       MYLIB/QCBLLESRC  |
    |SEU==> ____________________________________________________________     XMPLE1  |
    |FMT CB ......-A+++B+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  |
    |        *************** Beginning of data ************************************* |
    |'''''''                                                                         |
    |'''''''                                                                         |
    |'''''''                                                                         |
    |'''''''                                                                         |
    |'''''''                                                                         |
    |'''''''                                                                         |
    |'''''''                                                                         |
    |'''''''                                                                         |
    |'''''''                                                                         |
    |'''''''                                                                         |
    |'''''''                                                                         |
    |'''''''                                                                         |
    |'''''''                                                                         |
    |'''''''                                                                         |
    |'''''''                                                                         |
    |        ****************** End of data **************************************** |
    | F3=Exit   F4=Prompt   F5=Refresh   F9=Retrieve   F10=Cursor   F11=Toggle       |
    | F16=Repeat find       F17=Repeat change          F24=More keys                 |
    |Member XMPLE1 added to file MYLIB/QCBLLESRC.                                 +  |
    +--------------------------------------------------------------------------------+
  4. Type your source in the SEU Edit Display.
  5. Press F3 (Exit) to go to the Exit display. Type Y (Yes) to save your XMPLE1 and press Enter.

    The member XMPLE1 is saved.


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