• Keine Ergebnisse gefunden

USING THE SOURCE ENTRY PROGRAM

Im Dokument IBM 5280 (Seite 31-38)

Load the Source Entry Program by inserting the diskette containing the program into a diskette drive and responding to the load prompt.

o

0009 A i6 40 P 0 9 r· a III n a til e :

Partition nUlIlber:

Pro es 5 ENTEr.: 05-00

l~ ______ ~J

The name of the Source Entry Program on the diskette with the compiler is SYSSEP.

When the program is loaded, the system prompts you to select an initial data entry mode.

22 Using the Source Entry Program

o

0001 D 01 40

S e l pc: t i n i tiel I. cI a t a en t 1-Y 1110 cI f.o) Op t ions Cll-e

1. Enter-NEW! REPLACE 5. F:e°,- un

2. Update 4. Entf.~ ... ooooo{~DD

Se lee t OP t i eHOI : P ",0 €~ 5 sEN T E r~: 06-0001

l~~~~_J

Enter a 1 to write new source to an empty data set or to write over existing source in a data set. (All existing source will be lost when the new data is written.)

Enter a 2 to review and change previously entered source.

Enter a 3 to verify source for accuracy and to make corrections if necessary.

Enter a 4 to add source at the end of previously entered source in a data set.

Enter a 5 to review the source in rerun-display mode. (Normally, this option is not used when you are entering source programs.)

o

0001.

Next, the system prompts for file information about the source program data set.

A 26 E2 E

Enter data for data set open D a t a set "'1 a hl e : SYSIN

4000

Press ENTEr.;: 06-82

l~ ___________ ~J

Ensure that the diskette for the source program data set is inserted,' then respond to the prompting message. The name you assign to the data set in response to this prompt will be the name of the source program data set.

If you selected option 1 (Enter (NEW/REPLACE)) on the previous display (screen 06-81) and the data set entered in 06-82 does not exist on the diskette, the program prompts you for the information needed to allocate the data set. If the diskette is volume protected, the program prompts you for the owner identifier.

Note: The record length of the source program data set must be 80 because DE/RPG source statements are 80 positions long.

If you selected enter mode on the initial data entry mode prompt, the first format displayed is the menu of formats for the entry of source statements.

o

0001 E

SELECT / " Your entry goes here.

FORMAT: _

1 MENU ~) FILE DESCRIPTION 8 COMMENT

2 ,JOB SPECIFICATION 6 RECORD DESCRIPTION 9 CALCULATION

3 ENTRY FORMAT 7 FIELD DESCRIPTION 0 FMT 0 FOR HECmW IMAGE 4 REVIEW FORMAT T TABLE DESCRIPTION S SHIFT LOWER CASE (FMT

24 Using the Source Entry Program

SO)

You can select a format from the menu, or you can use the Select Fmt key to select the format you want to use. If you are entering a new source program, the first format you should select is format 2 because the job specification statement must be the first statement in a source program. If you are updating or adding source statements, you can select whichever format is appropriate.

As you enter source statements (records) into the data set, the Source Entry Program inserts a deleted record after every five records that you enter. This allows space in the data set for records to be added later.

Line Numbering

When a source program is compiled, the DE/RPG compiler assigns line numbers to the source statements. These line numbers are shown on the compiler listing. When the compiler assigns these numbers, a continued statement is assigned the same number as the associated primary statement (even though each statement is a separate record in the source program data set). Because of the line numbering and the insertion of deleted records, the record numbers of the statements in the data set and the line numbers on the compiler listing will often be different.

Keyboard Functions

While the Source Entry Program is executing, all the keyboard functions that are valid for use with a transaction file are supported. These functions include:

• Search functions

Second data set functions

• Record insert and delete functions

• Erase input functions

• Print function

• Page forward function

The search functions are useful when you are updating a source program to correct errors in the source statements. Although the line numbers on the compiler listing and the record numbers are not identical, the search functions can usually be used to find a record that is close to the desired source statement.

The second data set functions can be used to copy a group of source

statements from an existing data set into the new data set when enter mode is

Disable Auto Enter Function

Although the auto enter function is supported for entering source statements, this function should normally be disabled during source entry. This allows you to review each completed statement before it is written to the diskette. Also, when the auto enter function is disabled, you can correct an overrun in the keyword portion of the statement, as follows: You can reset the awaiting record advance condition (the cursor is flashing in the last record position) by pressing the character backspace (+) key, then you can enter a continuation character in the last position to allow a continuation line to be entered.

26 Using the Source Entry Program

Primary, Continuation, and Secondary Lines.

Continuation Characters General Coding Conventions

Names . . . . Reserved Words Sequence Numbers Keywords . . . . . Constants . . . . Comment Statements . Statement Descriptions

29 30 31 31 31 32 32 33 34 35

Chapter 3. Contents

28

Im Dokument IBM 5280 (Seite 31-38)