Entering Source Statements - IBM-ILE

Before you can start an edit session and enter your source statements, you must create a library and a source physical file. You can also compile source statements from Integrated File System (IFS) files. We strongly recommend that source code be kept in IFS stream files. See “Using the Integrated File System” for details.

You can use the Start Programming Development Manager (STRPDM) command to start an edit session, and enter your source statements.

Besides PDM, there are several other ways to enter your source:

  • The Copy File (CPYF) command.
  • The Start Source Entry Utility (STRSEU) command.
  • The Programmer Menu.

This is by no means an exhaustive list. There are other ways of creating source and placing it on an iSeries system, including NFS, and ftp.

Example

The following example shows you how to create a library, a source physical file, a member, start an edit session, enter source statements, and save the member.

  1. To create a library called MYLIB, type:
  2. To create a source physical file called QCSRC in library MYLIB, type CRTSRCPF FILE(MYLIB/QCSRC) TEXT(’Source physical file for all ILE C programs’) QCSRC is the default source file name for ILE C commands that are used to create modules and programs. For ILE C++ commands, the corresponding default is QCPPSRC. For information about how to copy this file to an Integrated File System file, see“Using the Integrated File System”.
  3. To start an edit session type:
  4. Choose option 3 (Work with members); specify the source file name QCSRC, and the library MYLIB.
  5. Press F6 (Create), enter the member name T1520ALP, and source type C. The SEU Edit display appears ready for you to enter your source statements.
  6. Type the following source into your SEU Edit display. Trigraphs can be used in place of square brackets, as demonstrated in this example.

  • Press F3 (Exit) to go to the Exit display. Type Y (Yes) to save the member T1520ALP.

The ILE C compiler recognizes source code written in any single-byte EBCDIC CCSID (Coded Character Set Identifier) except CCSID 290, 905 and 1026. See “Internationalizing Your Program” for information on CCSIDs. You can use the trigraphs shown in Table in place of characters in the C character set that are not available on your keyboard.

Trigraphs

Trigraphs

The C compiler also supports digraphs. The C++ compiler does not support digraphs.

All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

IBM-ILE Topics