cmstuff - nicolob/pep-full GitHub Wiki

cmstuff

Type: subroutine

Defined in: cmstuff.f

Definition: subroutine cmstuff

Revision History

  • Modified for CMS 1980 December

Description

call CMSOPN(fileid,nid,icode)
Open file with name 'fileid' (which must be a complete filespec);
name length is 'nid' bytes.
Returns indication of success in 'icode'
call CMSGET(array,recno,icode)
Read a record from last-opened 'fileid' into 'array', success
returned in 'icode'.  If the latest CMSOPN failed, the same
error code is returned again in 'icode'.
Note: the assumed record length is 80 bytes.  Longer records
are truncated at 80, and shorter ones are padded to 80 with
blanks.
Note: the value of icode passed to CMSGET has meaning if the
data set has an uncorrectable i/o error -- then, if icode=6,
the bad record is accepted and passed back to the caller with
a warning -- any other value of icode causes the bad record
to be rejected.
call CMSCLS
Close latest file (if any) and release buffers (if any).
This is not necessary for program operation  -- the old file
is automatically closed whenever CMSOPN is called with a
new one.  CMSCLS may, however, be useful when no further
reading is to be done.
call PDSOPN(fileid,member,icode)
Open file named 'fileid' and find member 'member'.  If that file
is already open, start the scan from the current point.
Return indicator of success in 'icode'.
Partitioned files must have separators between members in the
format: "./ ADD NAME=member".  The end should be marked by a
record containing "./ ENDUP".
call PDSGET(array,icode)
Read a record from last-opened 'member' into 'array', success
returned in 'icode'.  If the latest PDSOPN failed, the same
error code is returned again in 'icode'.
Note: the assumed record length is 80 bytes.  Longer records
are truncated at 80, and shorter ones are padded to 80 with
blanks.
Note: the value of icode passed to PDSGET has meaning if the
data set has an uncorrectable i/o error -- then, if icode=6,
the bad record is accepted and passed back to the caller with
a warning -- any other value of icode causes the bad record
to be rejected.
call PDSCLS
Close latest file (if any) and release buffers (if any).
This is not necessary for program operation  -- the old file
is automatically closed whenever PDSOPN is called with a
new one.  PDSCLS may, however, be useful when no further
reading is to be done.
fileid - filespec for the desired file (in a form usable
by the Fortran OPEN statement).
nid    - length in bytes of 'fileid' (only for CMSOPN: length is
always 8 for PDSOPN).
member - 8-character name of pds member to be read
recno  - record number to read. If 0, then next sequential.
This argument is not yet implemented and doesn't exist
for PDSGET at all.
array  - 80-byte array for returned record from file.
icode  - integer*4 variable for return code
-1  reached end of file (no info in array)
0  action completed ok
1  file (or member) not found on CMSOPN or PDSOPN
2  file could not be opened
3  improper record format
4  CMSOPN or PDSOPN never called (or not since close)
5  uncorrectable i/o error (no info in array)
6  uncorrectable i/o error (but array has something)
7  invalid fileid

Included Files

None.

Arguments

  • Not available.

Calls

  • cmscls
  • cmsget
  • cmsopn
  • pdscls
  • pdsget
  • pdsopn

Called By

  • ...

Notes

  • ...
⚠️ **GitHub.com Fallback** ⚠️