.ENABLE SUBSTITUTION
.ENABLE GLOBAL
.DISABLE DISPLAY
.SETF DEFALT
.SETF CREATE
.SETS SPACES "                                                 "
.SETS TYPE "SPR"
.SETF SKIP
.;
.;  MACHINE PRODUCABLE 'TYPE' ADDENDUM GENERATOR
.;
;[1;1H[2J
;
;			'TYPE'.CMD
;   This file creates an editable 'TYPE' report for submittal.
;The report file has an extension  .'TYPE'  and the file name
;is coded with the local site reference code number.
;
.; 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.
.;
.SETS ANSFIL TYPE+"DEFALT.CMD"
.TESTFILE 'ANSFIL'
.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   'ANSFIL'   to contain your default answers.
.IF <FILERR> NE 1 ;
.IF <FILERR> NE 1 .ASK CREATE Would you like to create a default answer file [Y/N] 
.IF <FILERR> NE 1 .GOTO REFCOD
.IF <FILERR> EQ 1 .ASK [<TRUE>] USDFLT Use the default answers (<CR>=> Yes) [Y/N] 
.IFT USDFLT @'ANSFIL'
.REFCOD:
.SETN $QARNM 0
.TESTFILE LAST'TYPE'.CMD;1
.IF <FILERR> NE 1 .GOTO NONMBR
@LAST'TYPE'.CMD;1
;
;The last reference code # entered is '$QARNM'
;
.INC $QARNM
.NONMBR:
.ASKS [1:5:"'$QARNM'"] LOCREF What is the local site reference code # (<CR>->'$QARNM'): 
.SETS PPN ""
.IFNDF $LOCL .ASKS [1:4] $LOCL What is the local site prefix code: 
.IF TYPE EQ "SPR" .ASKS TMP What is the DEC SPR form pre-printed form #: 
.IF TYPE EQ "SPR" .SETS PPN "PPN:"+TMP
.TESTFILE '$LOCL''LOCREF'.'TYPE'
.IF <FILERR> NE 1 .GOTO NEWFIL
;
; Warning - '$LOCL''LOCREF'.'TYPE' already exists
.ASK ANS Do you want to delete '$LOCL''LOCREF'.'TYPE' [Y/N]: 
.IFT ANS PIP '$LOCL''LOCREF'.'TYPE';*/DE
.IFF ANS .GOTO REFCOD
.NEWFIL:
.OPEN LAST'TYPE'.CMD;1
.DATA .SETN $QARNM 'LOCREF'.
.CLOSE
.ASKS [1:75.] ABSTRC Enter one line summary: 
.IFT CREATE .OPEN 'TYPE'DEFALT.CMD;1
.IFT CREATE .DATA .SETS $LOCL '$LOCL'
.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 (V4.0 - <CR>): 
.IF $OVRSN EQ "" .SETS $OVRSN "V4.0 BL31"
.IFT CREATE .DATA .SETS $OVRSN '$OVRSN'
.IFNDF $EDIT .ASKS [3:3] $EDIT What is your default editor name: 
.IFT CREATE .DATA .SETS $EDIT '$EDIT'
.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 [Y/N]: 
.IFT SRCS .SETS SRCANS "YES"
.IFF SRCS .SETS SRCANS "NO"
;
;'TYPE's may report   1. PROBLEMS/ERRORS
;                  2. SUGGESTED ENHANCEMENT
;                  3. OTHER-FYI(for your information)
;                  4. OTHER-INQUIRY
;
.ASKN [1.:4:1.] REP What type of 'TYPE' report is this: 
.IF REP EQ 1 .SETS TYP "1.  PROBLEM/ERROR"
.IF REP EQ 2 .SETS TYP "2.  SUGGESTED ENHANCEMENT"
.IF REP EQ 3 .SETS TYP "3.  OTHER-FYI"
.IF REP EQ 4 .SETS TYP "4.  OTHER-INQUIRY"
;
;PRIORITY FOR THIS 'TYPE'          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"
.SETT PUBLSH
.IF TYPE EQ "SPR" .ASK PUBLSH May this SPR be published [Y/N]: 
.ASK ATWILL Is the problem produced at will [Y/N]: 
.IFT ATWILL .SETS ATWLL "YES"
.IFF ATWILL .SETS ATWLL "NO"
.ASK ANS Could this 'TYPE' have been prevented by better documentation [Y/N]: 
.IFT ANS .SETS DOC "YES"
.IFF ANS .SETS DOC "NO"
.ASK ANY Are there any attachments [Y/N]: 
.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 '$LOCL''LOCREF'.'TYPE'
.ENABLE DATA
                            'TYPE' REPORT
  
LOCAL REF: '$LOCL''LOCREF'		 'TYPE' NUMBER:		'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'
-----------------------------------------------------------------------------
 
.DISABLE DATA
.IFT PUBLSH  .GOTO TITL
.ENABLE DATA
                      ****************************
                      * >>>> DO NOT PUBLISH <<<< *
                      ****************************
 
.DISABLE DATA
.TITL:.TEST ABSTRC
.SETN SPC 80.-<STRLEN>
.SETN SPC SPC/2
.SETS SPACE SPACES[1.:'SPC'.]
.ENABLE DATA

'SPACE''ABSTRC'
Description:
.DISABLE DATA
.CLOSE
.SETS FILL "__-___-__"
.IF TYPE EQ "QAR" .SETS FILL2 "        "
.IF TYPE EQ "SPR" .SETS FILL2 "11-     "
.TESTFILE 'TYPE'LST.FIL
.IF <FILERR> EQ 1 .GOTO OLDFIL
.OPEN 'TYPE'LST.FIL
.IF TYPE EQ "SPR" .DATA REF #	   SENT       RECV      ANSWER    'TYPE' #      ABSTRACT
.IF TYPE EQ "QAR" .DATA REF #	   SENT       ANSWER    'TYPE' #      ABSTRACT
.GOTO UPDATE
.OLDFIL:.IF <FILERR> EQ 1 .OPENA 'TYPE'LST.FIL
.UPDATE:
.IF TYPE EQ "SPR" .DATA '$LOCL''LOCREF'	'<DATE>'  'FILL'  'FILL'  'FILL2'  'ABSTRC'
.IF TYPE EQ "QAR" .DATA '$LOCL''LOCREF'	'<DATE>'  'FILL'  'FILL2'  'ABSTRC'
.CLOSE
;
;'$LOCL''LOCREF'.'TYPE' has now been created, edit in your 'TYPE'
;
.IFNDF $EDIT .SETS $EDIT "EDI"
;The default editor is '$EDIT'
.ASKS EDITOR What editor do you wish to use (EDI, EDT, KED, <CR>=>'$EDIT'): 
.IF EDITOR ="" .SETS EDITOR $EDIT
.XQT 'EDITOR' '$LOCL''LOCREF'.'TYPE'
