READCARD

CMS Commands

readcard.helpcmd.txt
READCARD                                                  CMS Transient command

Use the READCARD command to read data records from your virtual reader and to
create CMS disk files containing the data records.  The format of the READCARD
command is:
+----------+------------------------------------------------------------------+
| READcard | fn ft [A|fm]                                                     |
|          | * [* [A|fm]]                                                     |
+----------+------------------------------------------------------------------+
where:

fn       is the filename you want to assign to the file being read.

ft       is the filetype you want to assign to the file being read.

* [*]    indicates that file identifiers are to be assigned according to READ
         control cards in the input deck.

fm       is the filemode letter of the disk onto which the file is to be read
         and the filemode number of the file.  A filemode of A1 is assumed if
         this field is omitted or specified as an asterisk (*).  However, if a
         filemode number is on the control card, that number is used with A.
         When a filemode letter is specified on the command, the default
         filemode number is 1, unless the filemode number is on the control
         card.  Specifying a filemode letter and number on the command ignores
         the filemode letter and number on the control card and assigns that
         filemode to the file.


Usage notes:

1.  Data records read by the READCARD command must be fixed-length records, and
    may be a minimum of 80 and a maximum of 151 characters.

2.  CMS disk file identifiers are assigned according to READ control cards in
    the input deck (the PUNCH command header card is a valid READ control
    card).  When you enter the command:
       readcard *
    CMS reads the first spool reader file in the queue and if there are READ
    control cards in the input stream, it names the files as indicated on the
    control cards.

    The first card in the deck may not be a READ control card.  If not, CMS
    writes a file named READCARD CMSUT1 A1 to contain the data, until a READ
    control card is encountered or until the end-of-file is reached.

3.  If you specify a filename and filetype on the READCARD command, for
    example:
       readcard junk file
    CMS does not check the input stream for READ control cards, but reads the
    entire spool file onto the disk and assigns it the specified filename and
    filetype.

    If there were any READ control cards in the deck, they are not removed.
    Delete them using the editor if you do not want them in your file.  If the
    file is too large, you can either increase the size of your virtual storage
    (using the CP DEFINE command), or use the COPYFILE command to copy all
    records except the READ control cards (using the FROM and FOR options).

4.  READCARD loads a file from the reader into a temporary work file
    called "READCARD CMSUT2".  The existing file with the same name as
    the one being loaded from the reader is then erased.  The name of
    the temporary work file just created is changed to the name of the
    file just received.  However, if the file you are loading has the
    name "READCARD CMSUT2", it will be changed to "READCARD CMSUT3."
    "READCARD CMSUT2" is a reserved work filename of the READCARD
    command.

5.  To read a file onto a disk other than your A-disk, specify the filemode
    letter when you specify the filename and filetype; for example:
       readcard junk file c
    Or, if you want the READ control card to determine the filenames and
    filetypes, you can enter:
       readcard * * c

6.  If you are preparing real or virtual card decks to send to your own or
    another user's virtual card reader, you may insert READ control cards to
    designate filenames, filetypes, and optionally, filemode numbers, to be
    assigned to the disk file(s).

    A READ control card must begin in column 1 and has the format:
       :READ filename filetype filemode
    Each field must be separated by at least one blank; the second character of
    the filemode field, if specified, must be a valid filemode number (0
    through 6).  The filemode letter is ignored when this file is read, since
    the mode letter is determined by specifications on the READCARD command
    line.

7.  To send a real card deck to your own or another user's virtual card reader,
    punch a CP ID card to precede the deck.  The ID card has the keyword ID or
    USERID in column 1, followed by the userid you want to receive the file and
    optionally, spool file class and name designations; for example:
       ID MARY CLASS A NAME LITTLE LAMB
    Each field must be separated from the others by at least one blank.

8.  If the reader file being processed contains carriage control characters,
    the READCARD command returns the records with the carriage control
    characters stripped off.

9.  If any errors are encountered while attempting to read a spool file, the
    file will not be purged by the READCARD command and will remain in the
    reader.  This will occur regardless of whether the reader has been spooled
    HOLD or NOHOLD.  This is to protect you from losing reader spool files when
    an error is encountered.  If this occurs the reader spool file should be
    examined.  If the file is empty or unwanted, purge the file from your
    reader.

Responses:

When the command READCARD * is issued, control cards encountered in the input
card stream are displayed at the terminal to indicate the names assigned to
each file.

DMSRDC701I    NULL FILE
   The spooled card reader contains no records after the control card.

DMSRDC702I    :READ filename filetype fm (other information)
   A READ control card has been processed; the designated file is being written
   to the disk.

DMSRDC702I    READ CONTROL CARD MISSING. FOLLOWING ASSUMED:
DMSRDC702I    :READ READCARD CMSUT1 A1
    The first card in the deckis not a READ control card.  Therefore, READCARD
    CMSUT1 A1 is created.

DMSRDC738I    Record length is nnn bytes
    The records being read are not 80 bytes long; this message gives the
    length.