• Aucun résultat trouvé

STUDENT-ADDRESS PIC X(50)

Dans le document UNISYS • REPORTER III Vocabulary (Page 183-189)

LIST VOCAB LIB SYNTAX

03 STUDENT-ADDRESS PIC X(50)

IDVE SWDENT-RECDRD TO

Il-m:>RMATION-IN-THIRD-REOORD.

GO TO EXIT-ROOTINE

IF SWITCH

=

1

MOVE S'IUDENT-RECORD 'IO

INFORMATION-IN-FIRST-RECORD.

IF SWITCH

=

2

r-DVE srlJDENr-RECORD TO

INFORMATION-IN-SEmND-REmRD.

GO '10 INPtJr-ROUTlNE.

END-OF-~JOB END PRCX:!EDURE.

REPORTER III Reporter Specification:

VOC'AB "INPUl'''jIVl"

SUPPRESS WOOL.

SAVE PARAMETERS AS "INPlJT"/"PARAM" • SAVE WOOL SOURCE AS "INPur" /" SOURCE II • SAVE OBJECr AS "INPUT"j"OBJEC...'T" •

ASSIGN Aa::EPrED-DATA 'IO ODT.

ACCEPI' 'roDAYS-FILE b"TRING ( 6 ) DISPLAY

"ENTER 'roMYS FILE NAME WITH PERIOD{EX.STINr.)"

INPur ACCESS.

REPORI' NAME, sruDENT-ADDRESS, YFJ\R-IN-SCHOOL.

If the accepted data name has less than 22 characters, this name must be prefixed by "0-" when referenced in the WOOL code for input procedure.

If the accepted data name is nore than 22 characters, do not use a prefix.

If the 77-items are present in IDRKING SI'ORAGE, they must appear before any 01 level. The 77-items do not becane entries in the vocabulary but are included in the general report program. All Ols and the associated elementary item <data names> are added to the vocabulary. You can assign editing pictures to elementary items by using the Data-name-change statement (see WORKING-STORAGE specification).

Files presented in the DATA DIVISlot~ must have COBOL SELECT statements following the required FILE~r.ROL construct~ These files are considered part of the input procedure, are not added to the vocabulary, and cannot be reported. To report on any data item in a system file andj or LMSII data structure it must be noved to a WORKING-S'lORAGE data name other than a 77-level item.

The following example shows the skeleton OOBOL ccxie in the minimum fonn:

FILE--<XlNrmL.

DATA DrvrslOO.

PROCEDURE DIVISION.

INPl1r-ROUTINE •

M:>VE 1 'IO END-OF-lNPt1I'.

GO TO EXIT-murINE.

END-QF-JOB.

END PROCEOORE srATEMEN!'

The END PROCEIXJRE statement indicates the end of the input procedure.

RP3VOC adds any remaining WORKING-S'roRAGE data names to the vocabulary, and then stores the OOBOL code in the PROCEIXJRE DIVISION. RP3VOC is then ready to accept another INPUT statement if present.

Every INPur statement must have an accanpanying END-PROCEDURE statement.

The syntax for the END PROCEDURE statement is as follOYJS:

A

--->END--->PROCEDURE---> •

Path

A-B

I I

I

B

I

+--->ROUTINE--->+

Explanation

These paths are equivalent.

Examples:

END PROCEDURE.

END ROurINE.

END PROC.

INPUT PROCEDURE STATEMENT

The INPur PROCEDURE statement instructs RP3VOC that the mOOL code which follows is to be catalogued as an input procedure.

You can also use the USES clause of the input procedure to access previously defined data structures (system files and/or OMS II data sets) • The syntax for the INPUl' PROCEDURE statement is as follOlNS:

A

c

D

--->INPUT--->PROCEDURE----> <name>

--->

(1)

I \ I

\B I IE

+--->ROUTINE--->+ +--->USES----> (2)

L

(1)

---> . +<--- , <---+ I I

I KI I

I

F G

I I

(2)

--->

<data-structure --->+

name>

I I

I

H

I

I-->SEQUENTIALLY-> I

I - I

I

I

I

1->RANfX)MLY----> I

I I

I

J

I

+--> DYNAMICAILY->+

'!he paths of this syntax diagram are described be1011:

Path

A-B

c

Explanation

These paths are equivalent.

Specify the name of the input procedure here. This name is entered into the vocabulary and may be referenced in the INPur statement of the report specification •.

D Take this path if you do not want the input procedure to access previously defined data structures. Use this path if tile COBOL code for input procedure declares all the necessary files and record descriptions, and properly opens and closes these files.

E

Example:

INPUT PRCX:EDURE TRANS-INFO.

The USES clause allows the input procedure previously defined data structures.

Exanple:

INPUT PRCX:EDURE INPUT-CUST USES CUST-INFO.

to access

F The <data-structure name> is the first part of ti1e USES clause. The data-structure name identifies the data structures that you want the input procedure to access. If you include an embedded data set in the USES clause, you must first specify its higher data set in the clause.

G Take ti1is path if the data structure is not a system file or for system files if the input routine accesses the system file sequentially. Sequential access is the default.

H-J These paths only apply if the data structure is a system file.

Use these paths to specify if the input routine accesses the system file RANlXMLY, SEQUENTIAILY, or DYNAMICALLY. You can specify DYNAMICALLY only if tl1e system file organization is INDEXED or RElATIVE.

If you specify RANDOMLY with a sequentially organized file, the Q)OOL SELECT statement generated by the rep:>rt routines declares a random fil~ access mode, and specifies an ACTUAL

KEY clause. The name of the key is in the fonna.t QK<file name>. For example, for the randan access file PAY-ROLL, the key name is QKPAY-ROLL. A 77-level item is also generated to declare the key. Therefore, the input routine must follow the naming convention When accessing a randan file.

Example:

INPUI' PROC PAYROLL-INPur USES PAYROLL-FILE RANDOMLY.

K Take this path if you want the input procedure to access

Dans le document UNISYS • REPORTER III Vocabulary (Page 183-189)