• Aucun résultat trouvé

PROGRAM MANAGEMEN'I

Language-processing and program control conn-ands are used for pro gran managerrent.

LANGUAGE PROCESSING

The language-processing conmands enable the user to enter his source language data sets and have them processed into object nodules. He can change and correct source language statements during processing. PI/I and any processors supported by the PPLI are exceptions to this

statement.

The user initiates source language processing by issuing the c011'mand for the desired language type. The language-~rocessing commands are listed in 'lable 8. These corrmands are described in detail in Part III.

Table 8. LanguagE-processing coJllmands

r---~~--T---,

I Corrmand I Language Type

I

r---+---~

IASM IAssembler language I

IF~N IFORTRAN language compiler

I

I

LNR I Linkage editor

I

IPLI !PL/I language compiler

I

I COBOL ICeBOL Language compiler (supported by PPLI) I

·1

FTNH

I

FOR'l'RAN H Extended Language Compiler (supported by PPL!)

1

IHASM IAssembler H Language (supported by PPLI) I IPLICPT IPL/I Optimizing Compiler (supported by PPLI) I

l~ ______ ~ _____________________________________________________________ -J

A source program is a data set that contains source language statenents.

'10 be acce[:table for language processing, a prestored source program must have line organizaticn and must be named SOURCE. name. Source pro-grams are automatically cataloged and retained by the system. For PL/I, and PPLI sUFPorted processors, any legal name is acceptable.

When source statements are subnitted conversationally, or lIIIhen they forn part of the prestored SYSIN of a task, a source program is constructed with line organization. Each ~hysical line entered into the systeIr, ei-ther as a single card or as a single record of the line data set,

becom.es a physical record of the line data set (input length is linited to 120 characte.rs). continuation conventions for ccnbining two or more physical records into a sinyle logical statement for a language proces-sor are specified by that ~rocessor.

Note: 'Ihe com~ilation of PL/I and fPLI supporteq programs is not

interactive; you are not prompted for corrections to the source program.

PLII processing can only be initiated in a task for which the user is-sued a LOGCN in 24-bit mode (that is, logon userid,,24).

S'IEPS IN LAt:GUAGE PROCESSING

From the user's standpoint, source-language processing ~roceeds in one of four ways. Items 3 and 4 below do not apply to J"TjI or PPLI

proce$sing.

1. The task is nonconversational, and the source program is prestored.

The language processor picks up the source statements, line by line, and processes them. No corrections are made; any diagnostic wessages are written for later reference by the user.

2. 'the task is nonconversational, and the source "fregram and the com-uands governing language processing appear line by line in the SYSIN data set. In this case, a new source prcgrarr is created as lines are read from SYSIN. A line number is prefixed to each line to serve as the key 1:y which the line can be identified. Any diag-nostic messages are written for later reference by the user. The new program can be modified later.

3. The task is conversational with a prestored source program. Suc-cessive lines from the source program are read and processed by the

language processor. Diagnostic messages for a single statement are written at the terminal, along with the incorrect line, and the user is invited to enter corrections. To indicate to the user that he can enter corrections, the system types a pound sign (#) at the beginning of a new line, and the keyboard is unlocked. The user may enter a correction line, the first part of which must be the line number that identifies the line being corrected, followed by a comma and the contents of the line. For exanple:

Sys,User: '500, dc a{example)

This correction line is stored in the progran, either as an inser-tien line or as a replacement line, and the system requests the next correction line by issuing.. TO delete one or more lines, the user types, following #:

Sys,User: D,line number or he can enter:

Sys,User: D,first line number,last line number

Such corrections change the source program perrranently. To end corrections, the user presses the RETURN key in response to #. The correction lines are processed by the language processor, and if no corrections are required for then, the next line is taken fron the source program for processing.

'the user can enter other responses following the system's invita-tion. (#) to enter corrections: I or C. If the user types I and presses the RETURN key, language processing continues without fur-ther display of diagnostics or invitations to enter corrections.

This response is useful when the user determines that he has too many errors to correct conversationally. If the user types C and

presses the RETURN key, he receives all diagnostics, but is not to be permitted to make corrections until language processing is completed.

... 'the task is conversational« and the user enters his source state-ments from the terminal (that is, the source program is not pre-stored). The language processor, when ready for a source language line, writes a line number at the terminal, inviting the user tc enter a line. The line the user types is stored in the source pro-gram teing created and is also passed to the language processor.

The user can modify previously entered statements by typing after the system-issued line number:

sys,User: 0000500 Sline number,modification

The modificaticn the user types in after the comma is his insertion or replacement line. He can delete a line or lines ty typing after the system-issued line number:

Sys,User: 0000600 % D,line nurrber or he can enter:

Sys,User: 0000700 % D,first line number,last line number

~he % indicates to the system that a roodification follows. When the user enters the nExt source line that is not prefixed by %, the previously collected modifications are sent to the language froces-sor, and the line is stored in the source frogram. ~is line is picked up when the language processor has finished working on the modif ica tions.

If the user modifies a statement that has already been handled 'by the language processor, compilation restarts automatically. lior a more detailed description, refer to Asseubler Prcgrammer's Guide, FORTRAN programmer's Guide, and Linkage Editor.

when the language processor issues a diagncstic rr.essage, the con-versational user is prompted with # to enter corrections. He can enter insertions, replacements, and deletions, as described for a conversational task with a prestored source program. (See lterr 3, above.> He is prompted for corrections until he presses the RETURN key as the response tc the # request. At that faint, he is invited to enter his next source statement line.

The language processors display thE incorrect line. Ho~ever, ~hen the incorrect line is part of a continuation line, only the last part of the line is displayed; this part may nct contain the error. If the user wants to see the entire contents of the line, he:

1. Presses the ATTENTICN key to interrupt source language processing;

2. Invokes the text editor and rEviews the line in question:

3. Issues GO and resumes prOCESS mg.

when the entire source program has teen collected, the language proces-sor finishes its analyses of source statements and may issue more diag-nostic rressages. In FCRTRAN or assembler language and linkage editor processing, the processor asks the conversational user if he ~ants tc make modifications and restart or if he wants to continue processing.

When the user wants to continue, the next phase of the language proces-sor is executed. If no errors are found that prevent the processcr frorr producin9 an object prograrr module, the user is inforrred.

Finally, the object module is stored in the user's library (USERLlB), unless he has defined another job library. If the object module is to be stored in another job library, this library must be defined by the user in his current task before he initiates source language processing.

For the FORTRAN or asserrbler user, this library must be his most recent-ly defined library. Supplementary macro instruction libraries, used during assembly, must also be defined before language precessing is ini-tiated. For additional information ooncerning definiticn of theSE

libraries, see ASsembler programmer's Guide or FORTRAN Programmer's Guide. The linkage editor plaCES the object module in the library spec-ified in its input operands. For additional inforrr~tion, see Linkage Editor.

Express Mode: You can use express rrode to compile or assemble more than one program or to request more than one linkage editor function withcut repeatedly entering the FT~, ASM, or LNR corrmands and operands. (PL/I uses the continue function to achieve the same result.) See the appro-priate OS/VS language programmer·s guide for similar options for progra~

product languages supported by FFLI.

you set LPCXPRSS=Y in your user profile before invoking the language processor. If the task is nonconversational, the language processor reads the next record from SYSIN, following the corrpletion of language processing. If the task is conversational, the system prompts you to enter the module name. The language processor assumes the same opticns for the next scurce prograrr entered as those specified when the ASM,

FI'N, or LNK corr.mand was last specified. TO terminate language process-ing. you can enter a break character followed by a command or you can interrupt the language processor when you are prompted to enter the module name. To initiate language processing again, enter the

language-processing corrmand and cperands, but note that you are still in express mode (even though a system message said that express mode was

terrrinated.>

You can interrupt the express mode by pressing the ATTENTION key. If you want to terminate express mode, set LPCXPRSS=N and issue a GO corr-mand, as follows:

default lpcxprss=n go

The compilation, assembly, or linkage editing of the interrupted prograrr is corrfleted, and control is passed to the corrrrand system. However, when the prccessor encounters an error in the specification of a nodule name, a diagnostic messaae is issued, and language prccessing is termi-nated. Express mode is still active until LPCXPRSS=N.

~isting Data Sets

The user has complete control of the listings that are printed. Tte systeffi action for the listing data set varies, depending on whether the symbol given as the module name has been Freviously used. When tiis assembly, comFilation, or link-edit is the first cne in which the symbol is used, the system establishes in the useros catalog a generation data group (called LIST.symbcl) dnd maintains two generations. The systerr also specifies that when the numbEr of g~lerations e~ceeds two, the old-est generation is to be erased. When the listing data set for the cur-rent run has been produced, the syste~ catalogs it and rrakes it a new generation of the LIST. symbol generation data group.

When the sYffibcl has been used previously as a module name, the systerr adds the listing as a new generaticn to the existing generation data group. For example, the third listing data set for a given symbol neCOffies the latest generation CO); the second 1 isting becorr,es the (-1) generation; and the first listing is erased.

The user can change the number of generations that are rraintained in the generation data group associated with a given symbol. Assume he has neen working with a rrodule called ~YPROG, and that he has two genera-tions in his LIST.MYPROG generation data group. He can change the nurr-ber of generations rraintained in LIS~.MYPROG.

Exarrples:

1. Catalog the two generations as separate data sets (for this exarr-FIe, MYPRCG1 and r-;YPRCG2).

catalog list.rryFrogCO),u"myprog1 catalog list.mYFrogC-l),u"myprog2

2. Delete the system-defined generation data group~ LIST.MYPROG.

delete list.myprog

3. Define a new generation data group called LIST.MYPROG with five generations, remove the oldest generations, and erase them.

catalog gdg=list.myprog,5~o,y

4. Add the two temporarily cataloged generations to the new LIST.MYPROG generation data group.

catalog myprog2,u,~list.myprog(+1)

catalog myprogl,u"list.myprog(+l)

After the second CATALOG command is issued, MYPROGl becomes the latest (0) generation, and MYPROG2 becomes the (-1) generaticn;

three more generations can ce stored before MYPROG2 will ce erased.

To obtain a printout of the desired listings after language processing, the user issues a PRINT command with a data set name:

LIST.symbol (0)

for the latest listing or he issues:

LIST.symbol (-1)

for the last previous listing, if two generations were s~ecified.

The user can let the automatic erase logic associated with the genera-tion data groups remove his unwanted listings, cr he can issue the ERASE command or the ERASE option on the PRINT command to remove one or m,ore generations. (Refer to the descriptions of these commands in Part III.) Proqxanroing Notes: The user can create source data sets and correct assembly or compilation errors with the text-editing commands. By leav-ing the text editor invoked while he assembles or compiles a program, the user can make changes after assembly or cCITpilaticn is complete.

Refer to Section 2, Text Editing, for a descr iption of the text editor.

PROGRAM CONTROL

Program control system (PCS> commands provide the user with great flexi-bility for interacting directly with the execution of his programs.

These commands, and the system functions they request, are shown in Ta-ble 9.

Caution: Some of these commands are restrictive in the class of virtual storage they reference. The user may use all of these commands to ref-erence his control sections that have been assigned to private read/

write storage. However, a control section that has the read-only attri-bute may be referenced in all the commands except SET. Public nonprivi-leged CSECTs roay be displayed (via DISPLAY) or dumped (via DUMP), but the user cannot reference a public CSECT in a SET~ AT or TRAP command.

A user may never symbolically access nonprivileged or privileged system CSECTs. Any violation of these restrictions will result in a diagnostic message and rejection of the command.

dowever, if a CSECT having a system or privileged attribute is loaded froIT USERLIB or from a jot litrary (JCBLIE), all attritutes are ignored.

Private read/write storage is assigned to the CSECT, and the systerr does not recognize any of the above restrictions.

caution: PCS commands are generally roore difficult tc use with PL/I programs or programs generated by PPLI sUfI=Crted cOI£I:ilers. Since nc ISD is produced by an~ of these processcrs, synholic nanes may not te

~sed. In addition. actual hexadeci mal displacements from the roodule/

orocedure name are difficult to calculate since the name refers to the actudl entry point of executable code. This entry pcint may be at vari-ous displacements in the otject code although the listing might indicate displacement zero. However, once the correct instructicn is located in the object code, an 1\'1' statement and most other PCS statements may be used. Complicated PCS statements should be avoided.

~he user can employ PCS ccmmands to:

• Explicitly and implicitly load and unload his programs.

• Initiate execution of his programs.

• Request output of the contents of data fields, instruction loca-tions, and registers at any tiroe during execution of -his prograrr.

• Modify instructions and variables within his prcgran at any stage of execution.

• Specify locations within his progran where execution is to be stopped or started: when execution has been stopped, the user can issue additional coamands tefore he resumes execution.

• Establish logical (that is, true or false) conditions that allow or inhibit execution of other comroands.

• Perform arithmetic computations.

Table 9. PCS commands and their functions

r---T---,

ICoKmandl Function

I

r---+---i

IAT I Inform the user when execution of the frcgran. has reached a I I Idesignated instruction location or make the statement that I

I Ifollows this command dynaKic. I

I I I

IBRANCH IDynamically change the control path cf a program or reSURe I

I

lexecution at a different location.

I

I I I

ICALL ILoad and pass parameters to an object nodule and execute. I

I I I

IDISPLAYIPresent the values of variables, the contents of machine reg- I I listers, and the Sfecified virtual storage locations to user's I

! I SYSOUT. I

I I I

I DUMP IPresent the values of variables, the contents of machine reg- I i listers, and the sfecified virtual storage locations to the I

I I task • s PCSOUT data set. I

I I I

IGO IResume execution of a freviously interru~ted program.

I

I I I

I IF I Make the following statement conditicnal. I

I I I

ILOAD I Place an object module in the user's virtual storage without I

I I initiating execution. I

I I I

IQUALIFYIAllow the user to designate, before referring to group of I I linternal symbols, the program in which the specified symbols I I lare defined; thereafter, there is no need to explicitly quali-l

I I fy symbols. I

I I I

IREMOVE ISelectively delete the previously entered dynamic statements I

I I (that is, those that include liT). I

I I I

i RUN I Ini tiate execution of the loaded object nodule; resume execu- I I Ition of the interrupted program; load and initiate execution I I lof the object reodule. (Restrict.icns en the use of RUN are ! I I given in its command description in Part III.) I

I I I

ISE1 IChange the contents of machine registers, the values of pro- I I I gram variables, the virtual storage locations, or the cOImand I

I I symbolS. I

I I I

ISTOP IInterrupt eXEcution of the user's program; disflay the in- I I I struction location or the FORTRAN stateK,ent nunter where in- I

I Iterruftion was handled (if LlMEN=!). I

I I ,

11RAP IRequests notification when execution of an otject prograrr ,

I Icauses certain events to occur. I

I I I

IUNLOAD IRemove the specified object module fron the user's virtual !

I I stcrage. I

l _______ ~ ______________________________________________________________ J

USE OF COM~AND STATEMENTS

PCS corerrands are often conveniently expressed in command statements.

For purposes of this discussion, three types of command statements are considered: dynamic, immediate, and conditional.

DYNAMIC STATEMENT: This is a command statement that contains an A'1 or TRAP; the AT or TRAP should a~pear first in the statereent and should be the only A~ or TRAP command in the statement. Corrrrands that precede AT or TRAP are executed immediately; commands that follo~ AT or TRAP are not executed until control arrives at the instruction lccation designat-ed by the AT command, or the TRAP event occurs. Cnly these commands can fcllow AT or TRAP in a dynamic statement:

BRANCH CALL J:ISPLAY DUMP

GO IF SET STCP

If any other command appears in a dynamiC statement, a diagnostic rres-sage is issued. Several dynamic statements can be effective at the sarre instruction location; the statements are processed in the order in which they were issued. A dynamic statement has the form,

AT location;command TRAP operands;command

IMMEDIA~L STA1EMENT: This is a corrmand statement that does not begin with an AT. Irrmediate statements are executed when they are entered.

hny corrrrand except AT may appear in an immediate statement.

CCNJ:I~IONAL S~ATEMENT: This is a command statement that contains an IF.

Both irrrrediate and dynamic statements can be conditional. ~e condition that IF specifies must be satisfied before the commands that follow are executed. Commands preceding the first IF corrrrand are executed without regard to IF. When more than one IF appears in a conditicnal staterrent, the conmands making up the statement are executed from left to right un-t i l an IF un-thaun-t specifies an unsaun-tisfied condiun-ticn is encounun-tered, or un-the end of the corrmand statement is reached. Any command may appear in a conditional statement. A conditional statement has the form,

Both irrrrediate and dynamic statements can be conditional. ~e condition that IF specifies must be satisfied before the commands that follow are executed. Commands preceding the first IF corrrrand are executed without regard to IF. When more than one IF appears in a conditicnal staterrent, the conmands making up the statement are executed from left to right un-t i l an IF un-thaun-t specifies an unsaun-tisfied condiun-ticn is encounun-tered, or un-the end of the corrmand statement is reached. Any command may appear in a conditional statement. A conditional statement has the form,

Documents relatifs