DATA



DATA

     Enters data into the system from a device file.  (Cannot be
     used to enter data from $STDIN.)  (CM)

SYNTAX

     DATA [JSNAME,]USERNAME[/USERPASS].ACCTNAME[/ACCTPASS][;FILENAME]



NOTE      When this command appears immediately after the prompt
          is part of an input spool file it is preprocessed by the
          input spooler before it is interpreted by the CI.  It
          cannot be hidden or protected by continuation "&" or by
          quotation "'" or '"' characters.

PARAMETERS

JSNAME              NAME OF JOB OR SESSION THAT IS TO READ DATA.
                    DEFAULT IS NO JOB/SESSION NAME.

USERNAME            USER NAME THAT ALLOWS YOU TO ACCESS MPE/iX IN THIS
                    ACCOUNT, AS ESTABLISHED BY THE ACCOUNT MANAGER.

USERPASS            USER PASSWORD, OPTIONALLY ASSIGNED BY THE ACCOUNT
                    MANAGER. IF A PASSWORD EXISTS, BUT IS NOT SUPPLIED
                    IN THE COMMAND SYNTAX, THE STREAM COMMAND WILL
                    PROMPT YOU FOR IT IF:

                    o THE STREAM COMMAND IS INVOKED FROM A SESSION.
                    o NEITHER $STDIN NOR $STDLIST IS REDIRECTED.
                    o THE DATA COMMAND IS A FIRST LEVEL DATA COMMAND
                      (IT IS NOT NESTED WITHIN A SECOND LEVEL STREAM
                       COMMAND).

ACCTNAME            ACCOUNT NAME UNDER WHICH JOB/SESSION IS RUNNING, AS
                    ESTABLISHED BY THE SYSTEM MANAGER.

ACCTPASS            ACCOUNT PASSWORD, OPTIONALLY ASSIGNED BY SYSTEM
                    MANAGER.  IF A PASSWORD EXISTS, BUT IS NOT SUPPLIED
                    IN THE COMMAND SYNTAX, THE STREAM COMMAND WILL
                    PROMPT YOU FOR IT IF:

                    o THE STREAM COMMAND IS INVOKED FROM A SESSION.
                    o NEITHER $STDIN NOR $STDLIST IS REDIRECTED.
                    o THE DATA COMMAND IS A FIRST LEVEL DATA COMMAND
                      (IT IS NOT NESTED WITHIN A SECOND LEVEL STREAM
                       COMMAND).

FILENAME            ADDITIONAL QUALIFYING NAME FOR THE DATA THAT CAN BE
                    USED BY A JOB OR SESSION TO ACCESS DATA.  IT MAY BE
                    USED TO DISTINGUISH TWO SEPARATE DATA FILES THAT ARE
                    TO BE READY THE SAME PROGRAM.  DEFAULT IS THAT NO
                    DISTINGUISHING NAME IS ASSIGNED.

NOTE

THE JSNAME, USERNAME, USERPASS, ACCTNAME, ACCTPASS, AND FILENAME
PARAMETERS ALL ARE NAMES THAT CAN CONTAIN UP TO EIGHT ALPHANUMERIC
CHARACTERS, BEGINNING WITH A LETTER.

NOTE

     The "&" symbol has no meaning to the input spooler when it
     reads records because the CI is not involved at that point.


OPERATION

     THIS COMMAND IDENTIFIES DATA TO BE READ FROM A DEVICE FILE
     OTHER THAN YOUR STANDARD JOB/SESSION INPUT DEVICE.  IT CAN
     BE USED, FOR EXAMPLE, TO INPUT A DATA FILE FROM A SPOOLED
     INPUT DEVICE FOR LATER USE BY AN INTERACTIVE SESSION OR A
     BATCH JOB.  THE DATA COMMAND IS THE ONLY COMMAND THAT CAN
     BE ENTERED BEFORE A JOB OR SESSION IS INITIATED.  FILES
     IDENTIFIED BY DATA MAY BE INPUT ONLY FROM MAGNETIC TAPE ON
     SPOOLED TAPE DRIVES OR WITH THE STREAM COMMAND.

     TO DESIGNATE A SET OF DATA AS AN AUXILIARY FILE FOR YOUR JOB
     OR SESSION, ENTER THE DATA COMMAND FOLLOWED BY THE SET OF
     DATA AND THE EOD COMMAND.  TO ACCESS THE DATA, BEGIN YOUR
     JOB OR SESSION USING THE SAME IDENTITY ([JSNAME,]
     USERNAME.ACCTNAME) USED IN THE DATA COMMAND.  IF THE
     FILENAME PARAMETER IS OMITTED, SEVERAL DATA FILES CAN BE
     READ FROM ANY JOB OR SESSION WITH THE SAME IDENTITY.

     WHEN ENTERED FROM MAGNETIC TAPE, SUCH THE DATA MUST RESIDE
     IN A FILE ON A SINGLE TAPE VOLUME, AND THE BLOCKING FACTOR
     MUST BE 1.  WHEN THE MEDIA CONTAINING THE DATA FILE IS
     PLACED ON THE TAPE DRIVE AND THAT DEVICE IS PLACED ON LINE,
     MPE/iX READS THE ENTIRE FILE.  AT THAT POINT, THE JOB CAN
     ACCESS THE DATA, WHICH REMAINS AVAILABLE UNTIL IT IS
     ACTUALLY READ.  TO SUBMIT DATA FROM A DISK FILE, YOU MUST
     USE THE STREAM COMMAND.

     THE TIME-RELATED PARAMETERS OF THE STREAM COMMAND MAY NOT
     BE USED WHEN STREAM IS USED WITH THE DATA COMMAND.

     THE STREAM COMMAND WILL PROMPT YOU FOR BOTH USER AND ACCOUNT
     PASSWORDS IF THEY EXIST AND ARE NOT SUPPLIED IN THE DATA
     COMMAND IF THE FOLLOWING CONDITIONS ARE MET:

     o THE STREAM COMMAND IS INVOKED FROM A SESSION.
     o NEITHER $STDIN NOR $STDLIST IS REDIRECTED.
     o THE DATA COMMAND IS A FIRST LEVEL DATA COMMAND (IT IS NOT
       NESTED WITHIN A SECOND LEVEL STREAM COMMAND).

     THIS COMMAND MAY BE ISSUED FROM A SESSION OR JOB BY USING THE
     STREAM COMMAND TO INPUT A DATA FILE.  IT CANNOT BE USED
     DIRECTLY FROM $STDIN OR FROM A PROGRAM.


EXAMPLE(S)

     A DATA FILE IS CREATED ON DISK AND THE STREAM COMMAND IS
     USED TO MAKE THE FILE AVAILABLE TO YOUR PROGRAM

     STEP 1. CREATE THE FILE DATAFL ON DISK BEGINNING WITH THE
             DATA COMMAND AND ENDING WITH THE EOD COMMAND.

             DATA SESSB,BROWN.ACCT1
             .
             .

     STEP 2. STREAM THE DATA FILE USING THE STREAM COMMAND

             STREAM DATAFL

     STEP 3. LOG ONTO A SESSION, USING PRECISELY THE SAME
             IDENTITY THAT WAS USED IN THE DATA COMMAND.

             HELLO SESSB,BROWN.ACCT1

     STEP 4. ENTER A FILE COMMAND EQUATING THE FORMAL FILE
             DESIGNATOR (USED BY THE PROGRAM) WITH THE STREAM
             DEVICE (IDENTIFIED BY THE DEVICE CLASS NAME
             JOBTAPE).

             FILE DATAFL;DEV=JOBTAPE

     STEP 5. RUN THE PROGRAM THAT REQUIRES THE DATA

             RUN PROGY

     STEP 6. ONCE THE DATA HAS BEEN READ, IT IS NO LONGER
             AVAILABLE TO THE SYSTEM.  IF ANOTHER PROGRAM
             REQUIRES THIS DATA, THE DATA MUST BE ENTERED AGAIN
             WITH THE STREAM COMMAND.

ADDITIONAL INFORMATION

COMMANDS:   EOD