.ENABLE SUBSTITUTION
.ENABLE GLOBAL
.SETF DEFALT
.SETF CREATE
.SETS SPACES "                                                 "
.;
.;  MACHINE PRODUCABLE SPR ADDENDUM GENERATOR
.;
;
; THIS FILE WILL CREATE AN EDITABLE SPR ADDENDUM FOR SUBMITTAL WITH
; AN SPR FORM.  IT WILL CREATE A FILE WITH AN EXTENSION  .SPR  AND
; A FILE NAME CODED WITH THE LOCAL SITE REFERENCE CODE.
;
.; THE USER MAY CREATE A DEFAULT ANSWER FILE WHICH CONTAINS
.; RELATIVELY CONSTANT DATA SUCH AS NAME, ADDRESS, CITY, STATE, ZIP CODE,
.; PHONE NUMBER AND THE LIKE.  ANY GLOBAL VARIABLE, IN THIS FILE CAN BE
.; INCLUDED IN THE DEFAULT ANSWER FILE.  THE DEFAULT ANSWER FILE IS ONLY
.; USED IF IT EXISTS. OTHERWISE EVERY QUESTION IS PROMPTED FOR.
.;
.TESTFILE SPRDEFALT.CMD
.IF <FILERR> NE 1 ;
.IF <FILERR> NE 1 ; YOU COULD SAVE YOURSELF A GREAT DEAL OF WORK BY CREATING
.IF <FILERR> NE 1 ; THE FILE   SPRDEFALT.CMD  TO CONTAIN YOUR DEFAULT ANSWERS.
.IF <FILERR> NE 1 ;
.IF <FILERR> NE 1 .ASK CREATE WOULD YOU LIKE TO CREATE A DEFAULT ANSWER FILE
.IF <FILERR> EQ 1 .ASK DEFALT USE DEFAULT ENTRIES
.IFT DEFALT @SPRDEFALT.CMD
.ASKS PPN WHAT IS THE DEC PRE-PRINTED FORM NUMBER
.REFCOD:.ASKS LOCREF WHAT IS THE LOCAL SITE REFERENCE CODE
.TEST LOCREF
.IFF <ALPHAN> ; SPR.CMD -- ILLEGAL REFERENCE CODE
.IFF <ALPHAN> .GOTO REFCOD
.TESTFILE 'LOCREF'.SPR
.IF <FILERR> NE 1 .GOTO NEWFIL
;
; WARNING - 'LOCREF'.SPR ALREADY EXISTS
.ASK ANS DO YOU WANT TO DELETE 'LOCREF'.SPR
.IFT ANS PIP 'LOCREF'.SPR;*/DE
.IFF ANS .GOTO REFCOD
.NEWFIL:
.IFT CREATE .OPEN SPRDEFALT.CMD;1
.IFNDF $CUSTN .ASKS $CUSTN WHAT IS YOUR CUSTOMER SERVICE NUMBER
.IFT CREATE .DATA .SETS $CUSTN '$CUSTN'
.IFNDF $CPU .ASKS [5:5] $CPU WHAT IS YOUR CPU TYPE(11/45,11/70, ETC)
.IFT CREATE .DATA .SETS $CPU '$CPU'
.IFNDF $SYS .ASKS $SYS WHAT IS YOUR SYSTEM DEVICE
.IFT CREATE .DATA .SETS $SYS '$SYS'
.IFNDF $SIZ .ASKS $SIZ WHAT IS YOUR MEMORY SIZE IN K WORDS
.IFT CREATE .DATA .SETS $SIZ '$SIZ'
.IFNDF $DIST .ASKS $DIST WHAT IS YOUR DISTRIBUTION MEDIA
.IFT CREATE .DATA .SETS $DIST '$DIST'
.IFNDF $DECOF .ASKS $DECOF WHAT IS YOUR LOCAL DEC OFICE
.IFT CREATE .DATA .SETS $DECOF '$DECOF'
.IFNDF $OPSYS .ASKS $OPSYS WHAT IS YOUR OPERATING SYSTEM (RSX11M - <CR>)
.IF $OPSYS EQ "" .SETS $OPSYS "RSX11M"
.IFT CREATE .DATA .SETS $OPSYS '$OPSYS'
.IFNDF $OVRSN .ASKS $OVRSN WHAT IS ITS VERSION NUMBER (V3.2 - <CR>)
.IF $OVRSN EQ "" .SETS $OVRSN "V3.2"
.IFT CREATE .DATA .SETS $OVRSN '$OVRSN'
.ASKS PROGRM WHAT IS THE PROBLEM PROGRAM/DOCUMENT
.ASKS PVERSN WHAT IS THE VERSION OF THE PROGRAM DOCUMENT
.IF PVERSN NE "" .SETS PVERSN "("+PVERSN+")"
.ASK SRCS DO YOU HAVE THE SOURCES
.IFT SRCS .SETS SRCANS "YES"
.IFF SRCS .SETS SRCANS "NO"
;
; SPRs may report  1. PROBLEMS/ERRORS
;                  2. SUGGESTED ENHANCEMENT
;                  3. OTHER-FYI(for your information)
;                  4. OTHER-INQUIRY
;
.ASKN [1.:4:1.] TYPE WHAT TYPE OF SPR REPORT IS THIS
.IF TYPE EQ 1 .SETS TYP "1.  PROBLEM/ERROR"
.IF TYPE EQ 2 .SETS TYP "2.  SUGGESTED ENHANCEMENT"
.IF TYPE EQ 3 .SETS TYP "3.  OTHER-FYI"
.IF TYPE EQ 4 .SETS TYP "4.  OTHER-INQUIRY"
;
; PRIORITY FOR THIS SPR         1. HEAVY SYSTEM IMPACT
;                               2. MODERATE SYSTEM IMPACT
;                               3. MINOR SYSTEM IMPACT
;                               4. NO SIGNIFICANT SYSTEM IMPACT
;                               5. DOCUMENTATION/SUGGESTION
;
.ASKN [1:5] IMPACT WHAT IS THE SYSTEM IMPACT CODE
.IF IMPACT EQ 1 .SETS IMPCT "1.  HEAVY SYSTEM IMPACT"
.IF IMPACT EQ 2 .SETS IMPCT "2.  MODERATE SYSTEM IMPACT"
.IF IMPACT EQ 3 .SETS IMPCT "3.  MINOR SYSTEM IMPACT"
.IF IMPACT EQ 4 .SETS IMPCT "4.  NO SIGNIFICANT IMPACT"
.IF IMPACT EQ 5 .SETS IMPCT "5.  DOCUMENTATION/SUGGESTION"
.ASK ATWILL IS THE PROBLEM PRODUCED AT WILL
.IFT ATWILL .SETS ATWLL "YES"
.IFF ATWILL .SETS ATWLL "NO"
.ASK ANS COULD THIS SPR HAVE BEEN PREVENTED BY BETTER DOCUMENTATION
.IFT ANS .SETS DOC "YES"
.IFF ANS .SETS DOC "NO"
.ASK ANY ARE THERE ANY ATTACHMENTS
.IFF ANY .SETS ATTCH "NONE"
.IFT ANY .ASKS ATTCH WHAT IS ATTACHED
.IFNDF $NAME .ASKS $NAME WHAT IS YOUR NAME
.IFT CREATE .DATA .SETS $NAME '$NAME'
.IFNDF $CMPNY .ASKS $CMPNY WHAT IS YOUR COMPANY NAME
.IFT CREATE .DATA .SETS $CMPNY '$CMPNY'
.IFNDF $STRET .ASKS $STRET WHAT IS YOUR STREET ADDRESS
.IFT CREATE .DATA .SETS $STRET '$STRET'
.IFNDF $CITY .ASKS $CITY WHAT IS YOUR CITY
.IFT CREATE .DATA .SETS $CITY '$CITY'
.IFNDF $STATE .ASKS [2:2] $STATE WHAT IS YOUR STATE 
.IFT CREATE .DATA .SETS $STATE '$STATE'
.IFNDF $ZIP .ASKS [1.:6.] $ZIP WHAT IS YOUR ZIP CODE
.IFT CREATE .DATA .SETS $ZIP '$ZIP'
.IFNDF $PHONE .ASKS $PHONE WHAT IS YOUR PHONE NUMBER
.IFT CREATE .DATA .SETS $PHONE '$PHONE'
.IFT CREATE .CLOSE
.SETS SPACE ""
.OPEN 'LOCREF'.SPR
.ENABLE DATA
                           SPR ADDENDUM
  
LOCAL REF: 'LOCREF'		 SPR NUMBER:		     PPN: 'PPN'
----------------------------------------------------------------------------- 
'$OPSYS'   '$OVRSN'		'PROGRM''PVERSN'		     '<DATE>'
-----------------------------------------------------------------------------
                                 ! Dec Ofc. '$DECOF'  ! Have sources? 'SRCANS'
NAME:                            !-------------------------------------------
                                 ! Report type: 'TYP'
.DISABLE DATA
.TEST $NAME
.SETS SPACE SPACES[1:28.-<STRLEN>]
.ENABLE DATA
     '$NAME''SPACE'! Priority:    'IMPCT'
.DISABLE DATA
.TEST $CMPNY
.SETS SPACE SPACES[1:28.-<STRLEN>]
.ENABLE DATA
     '$CMPNY''SPACE'! Problem produced at will? 'ATWLL'
.DISABLE DATA
.TEST $STRET
.SETS SPACE SPACES[1:28.-<STRLEN>]
.ENABLE DATA
     '$STRET''SPACE'! 
.DISABLE DATA
.SETS TEMP $CITY+","+$STATE+"  "+$ZIP
.TEST TEMP
.SETS SPACE SPACES[1.:28.-<STRLEN>]
.ENABLE DATA
     '$CITY','$STATE'  '$ZIP''SPACE'!
                                 !
.DISABLE DATA
.SETS TEMP "CUST. #: "+$CUSTN
.TEST TEMP
.SETS SPACE SPACES[1.:28.-<STRLEN>]
.ENABLE DATA
     'TEMP''SPACE'!
-----------------------------------------------------------------------------
.DISABLE DATA
.SETS TEMP "! Phone: "+$PHONE
.TEST TEMP
.SETS SPACE SPACES[1.:33.-<STRLEN>]
.ENABLE DATA
! Phone: '$PHONE''SPACE'! Prob. prev. by better doc.? 'DOC'
-----------------------------------------------------------------------------
! List of attachments: 'ATTCH'
-----------------------------------------------------------------------------
! '$CPU'  !  '$SIZ' K words  ! Sys. Dev.: '$SYS'  ! Dist. Med.: '$DIST'
-----------------------------------------------------------------------------
 
Description:
.DISABLE DATA
.CLOSE
;
; 'LOCREF'.SPR HAS NOW BEEN CREATED, EDIT IN YOUR SPR
;
.XQT EDI 'LOCREF'.SPR
