• Aucun résultat trouvé

'0 Campi ler opt fan' Produces the Following output SOURCE

Dans le document VS FORTRAN (Page 109-114)

'0 Campi ler opt fan' Produces the Following output

SOURCE

XREF

LIST

MAP

FLAG

OBJECT TERMINAL

DECK

Compilation Headings: Compiler Hame and Release level, Source Program Name, Compilation Date, Listing Page Numb~r

A listing of the source program

Cross reference i nformat fon, showi ng each name and its type and usage; as well as where each name and statement is defined and used in the program

A listing of the object module--containing the relative location of each generated constant or statement, the name of the source item used in the instruction, plus section headings for: constants and data addresses, common areas, equivalenced variables, address

constants, external references, parameter lists, the save area, and generated instructions

A map of the source program, showing: the program name and sizQ, name usage and type, COMMON block information, and statement label usage and location

A listing of error messages at the FLAG level you've chosen:

I requests ali st i ng of all messages produced

W requests a listing of warning, error, severe error, and abnormal termination messages (return code 4 or higher)

E requests a listing of error, severe error, and abnormal termination messages (return code 8 or higher)

S requests a listing of severe error and abnormal termination messages (return code 12 or higher)

For an explanation of these message c6des, see "Diagnosti~ Message List i ng--FLAG Opt ion"

The object module in machine language form, produced f~r linkage edi tor input

Statistics and messages directed to the SYSTERM data set; also produces an indexed summary of statistics and messages for each compilation at the end of all compilations

The object module in machine language form to be produced as an output data set for punching or for cataloging

Compilation statistics: source program name, number of statements compiled, generated object module size (in bytes), the number and severity of error messages produced

Figure 23. Compiler Output Using Explicit Options

CATALOGING YOUR SOURCE--DOS/VSE

You can catalog source programs and source statement sequences you'll use in INCLUDE statements as books in the source statement library, using the CATALS function.

Then, when you compile a program using the INCLUDE statement, you must specify SYSSLB in an ASSGN statement.

(See the VS FORTRAN Application Programming: System Services Reference Supplement for additional detail.)

Compiling Your Program--Advanced Programming 91

CATALOGING YOUR OBJECT MODULE--POS/VSE

You request an object module data set by specifying the DECK compiler option.

You can use the object data set as input to the linkage editor or loader in a later job step, or you can catalog it for later

reference.

The data set is a copy of the object module, in card image format, which consists of dictionaries, text, and an

end-of-module indicator. (See "Object Module as Link-Edit Data Set-DECK Opt i on" for addi t i onal deta; 1. )

Once you've created the object module data set, you can catalog it in a ~ystem or private library for future reference.

How you do it depends upon the system you're using.

For VM/370-CMS con5iderations, FORTRAN."

sea

""_:_-

\,1;:111'':::1 VM/370-CMS w~th VS For OS/VS2-TSO considerations, see "Using OS/YS2-TSO with VS FORTRAN."

CATALOGING YOUR OBJECT MODULE--OS/VS

You can create partitioned data sets for use in your SYSLIB data set. You can then catalog your object module as a member in that library.

The library in which you catalog your object module is SYSLIB . . Then, when you link-edit and execute, you must specify SYSlIB in a DO statement.

(See the VS FORTRAN Application Proqramming: System Services Reference Supolement for additional detail.)

CATALOGING YOUR OBJECT MODULE--DQS/VSE

You can catalog your object module in the relocatable library, using the CATAlR function.

Then, when you link-edit and execute, you must specify SYSRlB in an ASSGN statement. (See the VS FORTRAN Appli~ation Programming:

System Services Reference Supplement for additional detail.)

92 YS FORTRAN Appli~ation Programming: Guida

0/

)

0)

(

\,·0

o

o

USING VM/370-CHS WITH VS FORTRAN

You can use the facilities of VM/370-CMS. taking advantage of quick terminal turnaround time, to develop VS FORTRAN program~.

You can compile your programs under VM/370-CMS and link-edit them to run under MVS, OS/VS1, or DOS/VSE; or you can compile, link-edit, and execute them under VM/370-CMS. However, the DOS/VSE version of the VS FORTRAN compiler end library is not supported under CMS/DOS.

THE CP AND CMS COMMANDS

There are CMS and CP commands that help you create and edit your source programs, link-edit your object modules, and execute your load modules. The VM/370-CMS commands you'll use most frequently are shown in Figure 25. Reference documentation for these

commands is given in the VS FORTRAN Application Programming:

System Services Reference Supplement.

USING YOUR TERMINAL WITH C"S

You must log on your terminal, using the procedures your organization has set up.

You can then use all the CP and CMS commands to develop, test, and run your VS FORTRAN programs.

When you finish a terminal session, you log off in the usual way.

See the IBM Virtual Machine Facility/370: Terminal User's Guide for documentation on terminal usage.

CREATING YOUR SOURCE PROGRAM-CMS EDIT COMMAND

To create a source program file, you use the EDIT command. (Use the EDIT command whenever you want to create a new file and also whenever you want to edit an existing one.)

The EDIT subcommands (such as FILE, INPUT, GETFILE, etc.) help you enter and edit the lines of source code.

To create a source program file, you specify the file type of your source program file as FORTRAN.

For example, to create a source program file named MYPROG, you specify:

edit myprog fortran

This creates an empty file for you, with the filename MYPROG, and the filetype FORTRAN. (If MYPROG already exists, the EDIT

command retrieves it for you and makes it available for editing.) You can now enter your source program into the file, line by line, according to the rules for fixed or free form source programs.

Fixed format FORTRAN files contain SO-character records; you 'use the first 72 characters for FORTRAN statements and continuation lines.

Using VM/370-CMS with VS FORTRAN 93

CMS Command usage

establishes the linkages for execution.

Prints a file on the off-line printer.

Punche~ a card file on the off-line card punch.

Changes the filetype, filename, and/or filemode of a file.

Causes compilation, link-editing, and execution of a source program file.

Begins execution of a previously loaded and link-edited file.

Types all or part~of a file.

Figure 24. VM/370-CMS Commands Often Used with VS FORTRAN

94 .VS FORTRAN Application Programming: Guide

' l

O

'.:~,

IBM EXTENSION

If you're using free form input, you can enter your source program into the file, line by line, according to the rules for free form source programs.

The maximum line length you can enter is 81 characters;

however, your source statements (excluding statement numbers and statement break characters) can be up to 1320 characters long.

You must ensure that sequence numbers do not appear in your free form source <columns 73-80). The use of the filetype FORTRAN (which is nscessary for both fixed and free form source) may automatically generate sequence numbers.

END OF IBM EXTENSION

(Reference documentation for creating source programs is given in the VS FORTRAN Application Pro~ramming: languagQ Reference manual.)

USING THE FORTRAN INCLUDE STATEMENT-CMS

If your source programs use the INCLUDE statement, you must specify a FILEDEF command for SYSLIB, to make the library containing the INCLUDE source code available. For INCLUDE statements, the data set records must be unblocked,

fixed-length, SO-character records.

1.

2.

Create one or more members wi th a fi letype of COPY.

edit member! copy a INPUT

file

common/com!/al,a2,a3,a4 common/com2/bl,b2,b3,b4

Create a FORTRAN source program.

edit myprog fortran a input

file

include (memberl) z

=

al

*

bl

end

3. Create a CMS macro library.

mac gQn tQstOl memberl COMPILING YOUR PRO&RAM-USING ens

If you have used an INCLUDE statement in your source program, you need to define SYSLIB for use by the compiler:

filedef syslib disk testOI maclib a(perm

If you want to compile MYPROG with the defaults your organization uses, you specify:

fortvs myprog

If, however, you want to compile MYPROG using nondefault compiler options,. specify, for example:

Using VM/370-CMS with VS FORTRAN 95

Dans le document VS FORTRAN (Page 109-114)