Study Notes for Ile RPG programmer Manual 2

Source: Internet
Author: User

1. Input Source statement

 

① Premise: the Library (crtlib) and the source physical file (crtsrcpf) already exist

(Recommended file record length: 112 characters)

12 characters, 80 characters, 20 characters

Comments of Serial Number Codes

 

Minimum Length: 92; recommended length: 112

 

② Use Seu for entry: strseu

③ If the source file is named qrpglesrc, SEU automatically sets the source type to rpgle.

④ You can embed SQL into the Ile RPG/400 Program (/exec SQL)

C/exec SQL

C ++...

...

C/end-Exec

 

2. Use the crtbndrc PG command to create a program

 

(1) Establish a program

Two types of programs can be created: ① OPM compatible programs without static connections (callb is not available) (dftactgrp = * yes)

② The Ile program with a static connection single module (dftactgrp = * No)

Determined by the dftactgrp Parameter

 

Note: static connection refers to the ability to call the process (in other modules or service programs) and to use process pointers. (The OPM compatible program cannot use the callb operation code or connect to other modules when the program is established; while the Ile program can specify the activity group in which the program will run and other modules with static connections when the program is established, and callb can be used for the operation ).

 

3. Create a debugging program for the source statement

① The dbgview parameters of crtbndrc PG and crtrpgmod determine the data to be compiled.

Option * stmt (do not display the source statement) allows you to use a compilation list to display variables and set breakpoints at the statement.

* Source: The same display as the input source statement

* Copy: creates a source statement display and displays the source statements with/copy members.

* List: display similar to the compilation list

* All: Create a display of all the above types

* None: No debugging data is generated.

② Debug the program: strdbg ......

 

4. Use the compilation list

 

① OUTFILE parameters in crtbndrc PG and crtrpgmod (* print generate list, * None do not generate List)

② The compilation list can be tailored.

Compile command:/tiele: Specify the title in the list

Chgjob: change the date, time format, Separator

/Eject and/space control the interval and page number of the compilation list

/Eject forces one page to interrupt and start another page

/Space Control List line spacing

③ Indentation of structured operations in the list

Indent: Specifies whether to indent, and specifies the characters marked with indentation (* none) Not indent

Example: Indent ('|') | and space (a maximum of 2 characters)

④ To help correct compilation errors, the list should contain the second-level information text:

Specify the option (* seclvl) parameter in the creation command. 5. Module

Each module of Ile RPG has only one process, so the scope of the process is the same as that of the module. When two modules are connected together, the program has multiple cycles. Each process has one cycle.

 

Commands that can be used by the module:

Display Module: (dspmod)

Modify the module: (chgmod)

Delete module: (delmod)

Processing Module: (wrkmod)

 

6. Connect modules as programs

 

① Use crtpgm to set up program objectives for one or more previously established modules.

1. Name

2. specify one or more modules and service programs

3. indicates which module has a program entry process [parameter entmod (* First default)]

 

② Related Cl commands

Chgpgm)

Delete a program (dltpgm)

Dsppgm)

Display program reference (dsppgmref)

Updpgm)

Processing Program (wrkpgm)

Compression target command (cprobj)

Decompress target (dcpobj)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.