PREVENTIVE MAINTENANCE (4)    BARCODE PROGRAM (446.4)

Name Value
NAME PREVENTIVE MAINTENANCE
IDENTIFIER ENPM
POST UPLOAD ROUTINE EN-ENBCPM1
IS DEVICE REQUIRED ? YES
LAST DATA PURGE FLAG 2001-02-08 00:00:00
SPECIALTY COMMANDS JANUS2020
BARCODE PROGRAM
                            ::RGY/ISC-Washington@Altoona, Pa
                            ::has been performed. Set up to hold as
S.CLR
P"1. Record PMI"
P"2. Transmit Data"         ::  (cont)
P"3. Review/Delete"         ::  (cont)
P"ENTER (1-3):"
A                           ::User input of option
G$0="1".ENTER               ::ENTER is entry tag for PMI
G$0="2".XMIT                ::XMIT is entry tag for transmit
G$0="3".REVDEL              ::REVDEL is entry tag for deletion
B00                         ::Sound beep two times
                            ::many as 1000 records.
S.CLR                       ::Clear screen
P"*** Error, enter a"       ::Print message of invalid input
P"number from 1-3, or"      ::  (cont)
P"turn TRAKKER off."
W5                          ::Wait 5 seconds to allow view of message
G.START                     ::Go back and display main menu
                            ::
                            ::Entries at this point should look like:
                            ::  SP21-110, or
                            ::  688 EE6798, or maybe
                            ::As always, first record is a user
                            ::  7832 EE659098
                            ::Anything else needs to be rejected.
.ENTER                      ::     ENTER
H#1=P                       ::Set regist 1 to Num. of rec. in PMI file
G#1>995.STOP                ::If PMI file full, do not allow anymore entries
S#1>985.WARN                ::If PMI file almost full, warn user
D$0="\e[2JRM: "+V(2)        ::Clear screen and display Room number
P$0                         ::  (cont)
D$0="ID: "+V(3)             ::Display current identifier
P$0                         ::  (cont)
                            ::specified identifier. Main purpose is
P"...Reader ready...\r\n"   ::Display input symbol for PMI
D$0=""                      ::Initialize input variable
A                           ::Allow user input of next equip id
DV(1)=$0                    ::For safe keeping
G$0=".".START               ::If input is ".", goto main menu
D$1=$0L2                    ::First 2 char of input
G$1="SP".LOC                ::Location label
G$0="F4".NOLBL              ::Process item without barcode label
D#1=[$0]                    ::Is this a PM number?
S#1>8.PMN                   ::Maybe so, go check
                            ::to safeguard against inadvertent file
GV(5)="PM".ENTPM            ::It was a PM number
S.PARSE                     ::What is it? Should be EE label.
SV(5)="??".HLP1             ::Not what we expected, print help and
GV(5)="??".ENTER            ::try again
.ENTPM                      ::Tag to skip parsing
GV(2)="".NOLOC              ::Have EE label, but no open loc
GV(5)="PM".PMR              ::PM number and open loc; record
GV(4)=V(5).PMR              ::EE label and open loc; record
GV(5)=V(6).PMR              ::alternate station number
GV(5)=V(7).PMR              ::second alternate
                            ::purges. We suggest that user enter
GV(5)=V(8).PMR              ::third alternate
GV(5)=V(9).PMR              ::fourth alternate
GV(5)=V(10).PMR             ::fifth alternate
GV(5)=V(14).PMR             ::sixth alternate
GV(5)=V(15).PMR             ::seventh alternate
GV(5)=V(16).PMR             ::eighth alternate
.RPT                        ::In case we need to repeat
S.CLR                       ::exception message
P"WARNING...EE label"
B01
                            ::something like 'PM'-initials-date
D$1="is from VAMC "+V(5)    ::Show foreign station
P$1
P"Cannot process."          ::Next screen
P"<ENTER> to cont..."
A                           ::Any char OK
S.CLR
G.ENTER                     ::Abort and move on
                            ::
.PMR                        ::     PMR
SV(5)="PM".CLR5             ::Dispense with flag
                            ::(ex: PM-SAW-9-12-90). If unit times
DV(3)=V(1)                  ::Move IEN for safe keeping
D$0="\e[2JRM: "+V(2)        ::Display current info
P$0
D$0="ID: "+V(3)
P$0
P"Enter P for PASS or"      ::PASS/FAIL
P"F for FAIL: "             ::Explicit action
D$0=""                      ::required
A1
G$0="P".PMRP
                            ::out for inactivity or is turned off,
G$0="F".PMRF
G.PMR
.PMRP                       ::     PMRP
GV(1)="F4".PMRP0
D$0=V(1)                    ::Device PASSED
RP                          ::Store EE number
.PMRP0
S.CLR
P"Press F1 for detail"      ::Get time and material
P"or ENTER to cont..."      ::if desired
                            ::this record will be displayed at
D$0=""
A
G$0="F1".PMRP1
G$0="".ENTER                ::No t&m desired
B11101                      ::Error condition (minor)
G.PMRP
.PMRP1
S.CLR
P"Time (hrs): "             ::Enter time
D$0=""
                            ::DH/ISC-Washington@Hampton, Va
                            ::power up time.
A                           ::Can't do pattern match
DV(1)=$0
P"Are you sure? Y//"        ::So we get confirmation
D$0=""
A
G$0="".PMRP11
G$0="Y".PMRP11
G$0="YES".PMRP11
G.PMRP1
                            ::
                            ::
.PMRP11
D$0="TIME:"+V(1)
RP                          ::Store time spent
.PMRP12
S.CLR
P"Materials ($): "          ::Enter materials
D$0=""
A                           ::Again, no type check
DV(1)=$0
P"Are you sure? Y//"        ::so we confirm
                            ::The Variable file (V) is a small file
D$0=""
A
G$0="".PMRP13
G$0="Y".PMRP13
G$0="YES".PMRP13
G.PMRP12
.PMRP13
D$0="MATRL:"+V(1)
RP                          ::Store material cost
DV(5)=""
                            ::used for scratch variables since
                            ::
.PMRP14                     ::Condition Code
S.CLR
P"Condition code (LN,"
P"G, or P):"
D$0=""
A
G$0="".PMRP15
G$0="L".PMRPN
G$0="l".PMRPN
                            ::IRL limits numeric and string registers.
G$0="N".PMRPN
G$0="n".PMRPN
G$0="LN".PMRPN
G$0="Ln".PMRPN
G$0="ln".PMRPN
G$0="G".PMRPG
G$0="g".PMRPG
G$0="P".PMRPP
G$0="p".PMRPP
S.CLR
                            ::V(0) is a scratch variable
P"Must press LN (Like"
P"New), G (Good), P"
P"(Poor), or ENTER."
W 3
G.PMRP14
                            ::
.PMRPN                      ::Condition is LIKE NEW
S.CLR
P"LIKE NEW Condition."
P"Correct? Y//"
                            ::V(1) is a scratch variable
D$0=""
A
G$0="".PMRPN1
G$0="Y".PMRPN1
G$0="y".PMRPN1
G.PMRP14
.PMRPN1                     ::Set the value
D$0="CODE:1"
RP
G.PMRP15
                            ::V(2) the last location entered
                            ::
.PMRPG                      ::Condition is GOOD
S.CLR
P"GOOD condition."
P"Correct? Y//"
D$0=""
A
G$0="".PMRPG1
G$0="Y".PMRPG1
G$0="y".PMRPG1
                            ::V(3) the last equipment number entered
G.PMRP14
.PMRPG1                     ::Set the value
D$0="CODE:2"
RP
G.PMRP15
                            ::
.PMRPP                      ::Condition is POOR
S.CLR
P"POOR Condition."
P"Correct? Y//"
                            ::V(4) contains station number
D$0=""
A
G$0="".PMRPP1
G$0="Y".PMRPP1
G$0="y".PMRPP1
G.PMRP14
.PMRPP1
D$0="CODE:3"
RP
                            ::
                            ::SAB/OIFO-Washington@Hampton, VA
                            ::V(5) station number on EE label
.PMRP15
S.WORK
G.ENTER
                            ::
.WORK                       ::Manual entry of WORK PERFORMED
S.CLR
P"WORK PERFORMED:"
P"(120 char max)"
P"(Optional)\r\n"
D$0=""
                            ::V(6) alternate station number
A
Q$0=""
DV(11)=""                   ::Record up to three
DV(12)=""                   ::forty char segments
DV(13)=""
DV(11)=$0L40
DV(12)=$0M40,41
DV(13)=$0M40,81
.WORKC                      ::Confirmation
D$0=""
                            ::V(7) another alternate station number
P"Are you sure? Y//"
A
D$1=$0L1
G$1="".WORKF
G$1="Y".WORKF
G$1="y".WORKF
G.WORK
.WORKF                      ::File WORK PERFORMED
D$0=V(11)
RP
                            ::V(8) another alternate station number
QV(12)=""
D$0=V(12)
RP
QV(13)=""
D$0=V(13)
RP
Q
                            ::
.PMRF                       ::     PMRF
GV(1)="F4".PMRF0
                            ::V(9) another alternate station number
D$0=V(1)                    ::Device FAILED
RP                          ::Store EE number
.PMRF0
D$0="FAILED"
RP                          ::and store a flag
.PMRF1
S.CLR
P"Describe problem"         ::Get a brief statement of
P"(40 char max):\r\n"       ::the problem. This will
D$0=""                      ::become the basis for a
                            ::V(10) another alternate station number
A                           ::corrective action work
DV(1)=$0                    ::order.
S.CLR
D$0=V(1)                    ::Truncate to 40 char
P$0
P"Are you sure? Y//"        ::Confirmation
D$0=""
A
G$0="".PMRF2
G$0="Y".PMRF2
                            ::V(11) scratch variable
G$0="YES".PMRF2
B10111
G.PMRF1
.PMRF2
D$0=V(1)
RP                          ::Store problem description
.PMRF3                      ::Get time
S.CLR
P"Time (hrs): "             ::Enter hours
D$0=""
                            ::V(12) scratch variable
A
DV(1)=$0
P"Are you sure? Y//"        ::Data validation check
D$0=""
A
G$0="".PMRF31
G$0="Y".PMRF31
G$0="YES".PMRF31
G.PMRF3
.PMRF31
                            ::V(13) scratch variable
D$0="TIME:"+V(1)            ::Store time spent in
RP                          ::FAILing device
G.ENTER
                            ::
.NOLOC                      ::     NOLOC
B1101                       ::Audible signal
S.CLR                       ::EE label scanned before
P"PMI process must"         ::location
P"begin with location"
P"label."
                            ::V(14) another alternate station number
P"Press <ENTER>..."
A                           ::Accept any char
G.ENTER                     ::Try again
                            ::
.NOLBL                      ::     NOLBL
GV(2)="".NOLOC              ::No open loc; can't proceed
S.CLR                       ::Get text description of
P"Enter MODEL NUMBER:\r\n"  ::items without barcode
D$0=""
A                           ::labels
                            ::1.9.2001
                            ::V(15) another alternate station number
G$0="^".NLABRT              ::User abort
D$2=$0                      ::Temp save of mod in $2
S.CLR
P"Enter SERIAL NUMBER:"     ::Get serial #
D$0=""
A
G$0="^".NLABRT              ::User abort
G$0="".NLABRT
D$3=$0                      ::Temp save of s/n in $3
.DESC                       ::Item description
                            ::V(16) last of eight possible alternate
S.CLR
P"Enter DESCRIPTION:\r\n"   ::Free text description
A                           ::40 char max because of fixed
D#0=[$0]                    ::record size
G#0<41.NOLBL1
S.CLR                       ::Clear screen for
P"ERROR  Description"       ::error message
P"may not exceed 40"
P"characters."
P"Press <ENTER>..."         ::Wait for user resp
                            ::      station numbers
A                           ::Take anything
G.DESC                      ::Try again
.NOLBL1                     ::Continue
D$1=$0                      ::Shuffle the string
D$0="MOD:"+$2               ::registers and file
RP                          ::user inputs
D$0="S/N:"+$3
RP
D$0=$1
RP                          ::Filing complete
                            ::F(0) is 39 char formatter
G.PMR                       ::Pass or fail
.NLABRT                     ::Jump here to skip filing
G.ENTER                     ::End of program segment
                            ::
.PMN                        ::     PMN
D$1=$0M1,5                  ::Is this really a PM number?
G$1="-".PMN1                ::Apparently so
Q                           ::Not PM number, return
.PMN1                       ::Assume NNNN-NNNN is PM#
DV(5)="PM"                  ::Set flag
                            ::
DV(0)=""                    ::Add prefix
DV(0)=V(1)
DV(1)=""
DV(1)="PM#:"+V(0)
Q                           ::Return
                            ::
.REVDEL                     ::     REVDEL
H#1=P                       ::Get last
D#1=#1-1                    ::record number
.LP10
OP(1000,40)                 ::Initialize PMI file
G#1=1.START                 ::Can't go above first LOCATION
S.CLR
C$1=#1                      ::Display
D$0=$1+") "                 ::last
D$0=$0+P(#1)                ::record
DF(0)=$0                    ::Truncate to
D$0=F(0)                    ::39 char
P$0
P"(D)elete, (Q)uit,"
P"or (C)ontinue..."
OV(17,40)                   ::Initialize variable file
D$0=""                      ::Clear input buffer
A1                          ::Single character entry
G$0="D".LP20                ::Deletion
G$0="Q".START               ::Back to main menu
G$0="C".LP30                ::Next previous record
P"Error. Must enter"
P"D, Q, or C."
P"To proceed, please"
P"press <ENTER>..."
D$0=""
OF(1,39)                    ::Truncation in REV/DEL
A                           ::Take anything
G.LP10                      ::Ask again
.LP20                       ::Actual deletion
S.CLR
P"Deleting record"
D$0="number "+$1
D$0=$0+"..."
P$0
W5
DP(#1)="*****"
                            ::
P"(Q)uit or (C)ont?"        ::Get instruction
D$0=""
A1                          ::Get one character
G$0="C".LP25                ::Continue review
G.START                     ::Back to main menu
.LP25                       ::     LP25
D#1=#1-1                    ::Move file pointer
G.LP10                      ::Back to display
.LP30                       ::     LP30
D#1=#1-1                    ::Move file pointer
.BEG                        ::     BEG
G.LP10                      ::End REVIEW/DELETE
                            ::
.XMIT                       ::     XMIT
D$0="ENPM"                  ::Define data identifier
XMP,$0                      ::Transmit data identifier to host system
XMP,P                       ::Transmit PMI file to host device
H#1=P                       ::Find how many records exist in PMI file
C$0=#1                      ::Set string variable to Number of Records
D$0="***END***^"+$0         ::Setup End of File message
XMP,$0                      ::Send End of File message to external device
                            ::
DV(4)=""                    ::Initialize station number
.ASK                        ::     ASK
S.CLR                       ::Clear screen
P"Data xmitted, do"         ::Display confirmation of transmission message
P"you want to purge"        ::  (cont)
P"the file (Y/N) ? "        ::  (cont)
D$0=""                      ::Initialize input variable
A                           ::Allow user input
G$0="Y".PUR                 ::If "Y", purge inventory file
G$0="N".START               ::If user input is a "N", go back to main menu
G$0=".".START               ::If user input is a ".", go back to main menu
DV(6)=""                    ::and alternates
B00                         ::Sound beep two times
S.CLR                       ::Clear screen
P"Please enter a "          ::Display error message
P"Y or N."                  ::  (cont)
W3                          ::Wait 5 seconds to allow view of message
G.ASK                       ::Go back and ask purge question
                            ::
.PUR                        ::     PUR
HP=0                        ::Purge of PMI file
HV=0                        ::Purge of local variable file
DV(7)=""
B0                          ::Sound beep one time
P"** File Purged **"        ::Inform user of purged file
W3                          ::Wait three seconds to allow view of message
G.BEG                       ::Go back to begining of program
                            ::
.CLR                        ::     CLR
P"\e[2J"                    ::Clear screen escape sequence
D$0=""                      ::Clear input register
Q                           ::Quit subroutine
                            ::
DV(8)=""
.WARN                       ::     WARN
B0                          ::Sound beep
P"\e[2J**** WARNING ****"   ::Clear screen and print warning message
P"Data file is almost"      ::  (cont)
P"full.  Please XMIT"       ::  (cont)
P"data and purge file."     ::  (cont)
W3                          ::Wait three seconds to allow view of message
Q                           ::Quit subroutine
                            ::
.STOP                       ::     STOP
DV(9)=""
B00                         ::Sound beep two times
S.CLR                       ::Clear screen
P"Sorry, data file is"      ::Print error message
P"FULL, you must XMIT"      ::  (cont)
P"and purge file."          ::  (cont)
W5                          ::Wait five seconds to allow view of message
G.START                     ::Go back to main menu
                            ::
.DAT                        ::     DAT
S.CLR                       ::Clear screen
DV(10)=""
B00                         ::Sound beep two times
P"*** WARNING ***"          ::Print warning message of existing data
P"Data exists on"           ::  (cont)
P"this barcode reader."     ::  (cont)
W5                          ::Wait five seconds to allow view of message
S.CLR
P"The file ID is:"          ::Display first record to user
D$0=P(0)                    ::Setup display of first record
P$0                         ::Print first record
W5                          ::Wait five seconds to allow view of message
DV(14)=""
S.CLR                       ::Clear screen
P"Do you want to"           ::Query user to purge existing file
P"purge this file ..."      ::  (cont)
P"... (Y/N) ? "             ::  (cont)
D$0=""                      ::Initialize input variable
A                           ::User input
G$0="Y".PUR                 ::If user input is a "Y", go and purge files
G$0="N".START               ::If user input is a "N", go to main menu
G$0=".".START               ::If user input is a ".", go to main menu
B00                         ::Sound beep two times
DV(15)=""
S.CLR                       ::Clear screen
P"Please enter a "          ::Display error message
P"Y or N."                  ::  (cont)
W5                          ::Wait five seconds to allow view of message
G.DAT                       ::Go back a existing data question
                            ::
.LOC                        ::     LOC
                            ::Process location label in $0
SV(2)="".NLOC               ::No location presently open
SV(2)=$0.CLOC               ::Loction is open
DV(16)=""
G$0="".LOCQ                 ::All is well
P"ERROR Must close"         ::Display error
B1101                       ::message and sound alarm
PV(2)
P"before you may open"
P$0
W10                         ::10 sec to read
.LOCQ                       ::Exit from subroutine
G.ENTER                     ::Next read
.NLOC                       ::     NLOC
DV(4)=|ENSTA|               ::Pass station # from DHCP
DV(2)=$0                    ::Store new current location
RP                          ::Add new loc to file
D$0=""                      ::All OK flag back to LOC
Q
.CLOC                       ::     CLOC
DV(2)=""                    ::Close current location
D$0=""                      ::All OK flag back to LOC
DV(3)=""                    ::Clear last EE for new loc
Q
G.ENTER
                            ::Preventive Maintenance (PM) Program
D$3=|ENEMP|                 ::Pass PM Inspector
                            ::
.PARSE                      ::     PARSE
DV(5)=""
D#1=0                       ::Initialize character count
.FNDBL                      ::Look for space
D#1=#1+1                    ::Increment counter
D$1=$0M1,#1                 ::Examine current char position
G$1="".PARS1                ::Must not be any spaces
G$1=" ".PARS1               ::That's more like it
G.FNDBL                     ::Keep looping
DV(6)=|ENSTA(1)|            ::Pass alternate station number(s)
.PARS1
S$1="".ERR1                 ::Can't be right
S$1=" ".PARS2               ::Continue
Q                           ::Return control to segment ENTER
                            ::
.PARS2                      ::     PARS2 (2ND LEVEL)
D#2=[$0]                    ::Length of label
D#3=#1+1                    ::Start of second piece
D#4=#2-#1                   ::Length of second piece
D$1=$0M#4,#3                ::Set $1 to second piece
DV(7)=|ENSTA(2)|            ::<space> if null
D$2=$1L2                    ::Application code
G$2="EE".PARS3              ::Application code should be EE
DV(5)="??"                  ::Error condition
G.PARS4
.PARS3                      ::Where we want to be
D#3=#1-1                    ::Length of station number
DV(5)=$0L#3                 ::Store station number from label
.PARS4                      ::Re-entry from error condition
Q                           ::Return control to PARSE, passing param V(5)
                            ::
DV(8)=|ENSTA(3)|
.ERR1                       ::     ERR1
DV(5)="??"                  ::Flag error for segment .ENTER
Q
                            ::
.HLP1                       ::     HLP1
S.CLR                       ::Called from .ENTER if input
GV(1)="?".HLP12             ::is a question
P"** INVALID ENTRY **"      ::or is questionable
B1010                       ::Audible signal
P"Press <ENTER> to"
DV(9)=|ENSTA(4)|
P"continue, or enter"
P"'?' for help."
D$0=""
A                           ::User response
G$0="".HLP1Q                ::Help declined
D$0=$0L1                    ::Look at first char
.HLP12                      ::'?' to begin with
SV(1)="?".HLP2              ::More help
S$0="?".HLP2                ::Show help text
.HLP1Q                      ::Exit subroutine
DV(10)=|ENSTA(5)|
Q
                            ::
.HLP2                       ::     HLP2
D$0=V(2)                    ::Ck for location
G$0="".HLP3
P"Expecting equipment"      ::Expanded help
P"id (ex:688 EE9372),"
P"PM #, or special"
P"function key F4."
W10                         ::10 sec to read
DV(14)=|ENSTA(6)|
P"Will also accept"
D$0=V(2)                    ::Display current
P$0                         ::location
P"to close location"
P"or '.' to exit."
W10
Q
                            ::     HLP3
.HLP3
S.CLR                       ::No location
DV(15)=|ENSTA(7)|
P"PMI process must"
P"begin with a"
P"location label."
W10
Q
.CLR5                       ::Clear var
DV(5)=""
Q
                            ::
E                           ::End of program
DV(16)=|ENSTA(8)|
H#1=P                       ::Set reg 1 to current rec # in PMI file
                            ::File P set up to contain as many as
G#1>0.DAT                   ::If data alread exist in PMI file warn user
S.CLR                       ::Clear screen
P"Please enter ..."         ::Ask user for file ID
P"file ID: "                ::   (cont)
D$0=""
A                           ::User input of user ID
D$0="ID "+$0                ::Force an entry
RP                          ::Store file ID into PMI file
DV(2)=""                    ::Initialize V(2)
DV(3)=""                    ::and V(3)
                            ::File P will hold the identifiers (IEN's)
S.CLR
P"Station number:"          ::Display only
PV(4)                       ::Alternates not shown
P"To continue, please"
P"press ENTER..."
A                           ::Continue
D$0=""
                            ::
.TEC                        ::     TEC
S.CLR                       ::Disp name of tech
                            ::of equipment for which a PM inspection
P"PM Inspector is:"
P$3
D$0=$3
RP                          ::File Inspector
P"Please press ENTER."
A                           ::Proceed
D$0=""
                            ::
                            ::
.START                      ::     START