SQRT, DSQRT, CSQRT - Computes the square root (Cray Fortran intrinsic function) SYNOPSIS
3. COS DATASET MANAGEMENT SUBPROGRAMS
Dataset management subprograms provide the user with the means of managing COS permanent datasets; creating, staging, and releasing datasets; and changing dataset attributes. These routines are grouped into two subsections:
• COS control statement type subprograms
• COS dataset search type subprograms IMPLEMENTATION
The dataset management routines are available only under
cos.
COS CONTROL STATEMENTTVPE SUBPROGRAMS
SR-Ol13
A control-statement-type subprogram resembles Cray job control language (JCL) statements in name and purpose. A subprogram, however, can be called from within Fortran or CAL programs while a JCL statement cannot. See the
cos
Reference Manual, publication SR-OOll, for a description of control statements, parameters and keywords, and JCL error codes.The following is an example of a Fortran call to a control-statement-type subprogram:
EXAMPL='EXAMPL'L IDC='PR'L
CALL ASSIGN(irtc, 'DN'L,EXAMPL, 'U'L, 'MR 'L, 'OC'L,IDC)
Variable
irtc
is an integer that contains a status code upon return. A status code of 0 indicates no errors.This type of subprogram requires call-by-address subroutine linkage with the following calling sequence:
CALL SUBROUTINE NAME(stat,keyl,key2, ... ,keyn) stat Returned status code MODIFY(DN=DATASET,PAM=R:W) would be coded as follows:
INTEGER P AM(3)
DATA PAM/'R'L, 'W'L, 0/
CALL MODIFY(ISTAT, 'DN'L, 'DATASET'L, 'PAM'L, PAM)
3-1 C
INTRO(3X) INTRO(3X)
SR-Ol13
Permanent Dataset Management routines access the
cos
Permanent Dataset Manager (PDM) and return the status of the operation in stat. The value is 0 if an error condition does not exist and nonzeroAssociates a permanent dataset with the job Expands or contracts a permanent dataset
Removes a saved dataset. The dataset remains available to the job until it is released or the job terminates.
Changes the permanent dataset characteristics
Specifies the user access mode to a permanent dataset
Makes a dataset permanent and enters the dataset's identification and makes it permanent and available to the job making the request
Directs a dataset to the specified front-end processor or designates it to a scratch dataset
Brings a front-end resident dataset to the Cray mainframe and makes the dataset available to the job
Places a job dataset into the Cray input queue. When called as an integer following log file message:
SL020 - INV AUD DATASET NAME OR UNIT NUMBER
All of the SL messages and descriptions of their meanings can be found in the COS Message Manual, publication SR-0039.
3-2 C
INTRO(3X) INTRO(3X)
The following is a list of definition and control routines.
Control Statement ASSIGN
OPTION RELEASE
Function
Opens a dataset for reading and writing and assigns characteristics to it Changes the user-specified options, such as lines per page and dataset statistics, for a job
Closes a dataset, releases I/O buffer space, and renders it unavailable to the job
COS DATASET SEARCH TYPE SUBPROGRAMS
Dataset search subprograms add information to or return information about a dataset.
The following table contains the purpose, name, and heading of each dataset search type routine.
COS Dataset Search Type Subprograms
Purpose Name Heading
Add a name to the Logical File ADDLFT ADDLFT Table (LFT)
Search for a Dataset Parameter GETDSP GETDSP Table (DSP) address
Determine if a dataset has been IFDNT IFDNT accessed or created
Allow a program to access datasets SDACCESS SDACCESS in the System Directory
SR-01l3 3-3 C
ADDLFI' (3COS)
NAME
ADDLFf - Adds a name to the Logical File Table (Lm SYNOPSIS
CALL ADDLFT(dn,dsp) DESCRIPTION
dn Name to add to the LFf
dsp Dataset Parameter Table (DSP) address for the name specified by dn IMPLEMENTATION
This routine is available only to the users of the COS operating system.
SR-Ol13 3-4
ADDLFf(3COS)
c
CALLCSP (3COS) CALLCSP (3COS )
NAME
CALLCSP - Executes a COS control statement SYNOPSIS
CALL CALLCSP(string) DESCRIPTION
NOTE
string A valid COS JCL statement, either packed into an integer array and terminated by a null byte or specified as a literal string.
The control statement specified in the string is executed as if it had been found next in the job stream.
For example, the following call invokes the NOTE utility, which writes IDGH, THEIR! to the $OUT dataset:
CALL CALLCSP('NOTE,TEXT="HIGH, THEIR!".') Control does not return from the CALLCSP routine.
In general, use CALLCSP instead of LGO.
IMPLEMENTATION
This routine is available only to users of the COS operating system.
SR-Ol13
3-5
CGETDSP (3COS) GETDSP (3COS )
NAME
GETDSP - Searches for a Dataset Parameter Table (DSP) address SYNOPSIS
CALL GETDSP(unit.dsp.ndsp.dn) DESCRIPTION
unit
Dataset name or unit number dsp DSP addressndsp Negative
nsp
offset relative to the base address of DSPs, or DSP address if thensp
is below JCHLM.dn Dataset name (ASCll, left-justified, blank-filled)
GETDSP searches for a
nsp
address. If none is found, ansp
is created.IMPLEMENTATION
This routine is available only to the users of the COS operating system.
SR-Ol13 3-6 c
IFDNT (3COS )
NAME
IFDNT - Determines if a dataset has been accessed or created SYNOPSIS
stat=IFDNT(dn) DESCRIPTION
stat -1 (TRUE) if dataset was accessed or opened; otherwise 0 (FALSE).
dn Dataset name (ASCn, left-justified, zero-filled) NOTE
stat must be declared LOGICAL in the calling program.
EXAMPLE
IF (NOT IFDNT(,MYFILE'L» CALL ACCESS(,DN'L, 'MYFILE'L)
IFDNT (3COS)
If you access MYFILE twice in a program, the system aborts the job. IFDNT allows you to test for its having been previously accessed.
IMPLEMENTATION
This routine is available only to the users of the COS operating system.
SR-OI13
3-7c
SDACCESS (3COS) SDACCESS (3COS )
This function has no corresponding control statement. Datasets accessed in this manner are automati-cally released at the end of the job step.
PRINT*,'***DATASET ',NAME. 'WAS NOT LOCAL***' CALL SDACCESS(STAT,NAME)
INTRO(3X) INTRO(3X)