         PAGE
R0       EQU      0
R1       EQU      1
R2       EQU      2
R3       EQU      3
R4       EQU      4
R5       EQU      5
R6       EQU      6
R7       EQU      7
SR1      EQU      8
SR2      EQU      9
SR3      EQU      10
SR4      EQU      11
D1       EQU       12
D2       EQU      13
D3       EQU      14
D4       EQU      15
         PAGE
STORVLP  DSECT    1
         TITLE    'STORVLP'
         SYSTEM   SIG7
*
* STORVLP         STORE VARIABLE LENGTH PARAMETERS (OPEN FPT)
*
* INPUT
*        OPNFPT   OPEN FILE PARAMETER TABLE
*        ARGBUF4  BYTE EQUIVALENT OF ARGUMENT BUFFER -ARGBUF-
*        NCHAR    LENGTH OF CURRENT ARGUMENT
*        R1       VLP CODE (1-NAME,2-ACC,3-PASS,4-SN,5-EXPIRE,
*                           6-RD ACCT,7-WR ACCT)
* OUTPUT
*        OPNFPT   UPDATED WITH CURRENT ARGUMENT
*
*
         REF      VLPOPEN
         REF      MBS,OPNFPT,ARGBUF4,NCHAR
*
         USECT    STORVLP
         LCI      7                 SAVE REGISTERS
         PSM,R5   *R7
*
         CI,R1    3                 PASS WORD ENTRY
         BNE      STORVLP1          NO
         LI,R4    2
         LI,R5    X'FF'
         STS,R4   VLPOPEN+9,R7      MAKE A LIVE PASS WORD VLP ENTRY
STORVLP1 EQU      %
*
         LI,R6    X'FFFF'           GET CONTROL WORD INDEX
         AND,R6   VLPLINK-1,R1
         LW,R4    VLPLINK-1,R1      GET EXISTANCE FLAG SETTING
         SLD,R4   -20
         SLS,R5   -28               GET LENGTH OF ENTRY
*
         OR,R4    OPNFPT+1,R7       SET EXISTANCE FLAG
         STW,R4   OPNFPT+1,R7
*
         LI,R3    X'FF00'           CALCULATE BYTE INDEX OF VLP INDEX
         AND,R3   *R6,R7
         SLS,R3   -8
         AW,R3    R6
         AI,R3    1
         SLS,R3   2
         LI,R2    ARGBUF4+1         GET BYTE INDEX OF PARAMETER
         LW,R1    R5                GET LENGTH OF PARAMETER
         BNEZ     MBS1
         LW,R1    NCHAR,R7          ADJUST FOR TEXTC PARAMETER
         AI,R1    1
         STW,R1   R5
         LI,R2    ARGBUF4
*
MBS1     BAL,SR4  MBS               MOVE BYTE STRING
*
         AI,R5    3                 CALCULATE ENTRY WORD COUNT
         SLS,R5   -2
         SLS,R5   8
         AWM,R5   *R6,R7            ADD COUNT TO CONTROL WORD
*
         LCI      7                 RESTORE REGISTERS
         PLM,R5   *R7
         B        *SR4
*
*                 EXISTANCE BIT,BYTE LENGTH (ZERO-TEXTC FILE NAME)
VLPLINK  DATA     X'00000000'+VLPOPEN        FILE NAME
         DATA     X'00880000'+VLPOPEN+9      ACCT. NO.
         DATA     X'20080000'+VLPOPEN+12     PASS WORD
         DATA     X'04040000'+VLPOPEN+82
         DATA     X'10080000'+VLPOPEN+49   EXP DATE
         DATA     X'01080000'+VLPOPEN+15   RD ACCT
         DATA     X'02080000'+VLPOPEN+32   WR ACCT
         DATA     X'03080000'+VLPOPEN+52    EXECUTE ACCT.
         DATA     X'00000000'+VLPOPEN+69    VEHICLE ACCT.
         END

