BARCODE PROGRAM |
::RGY/ISC-Washington@Altoona, Pa
::many as 1000 records.
::Entries at this point should look like:
:: SP21-110, or
:: 688 EE6798, or maybe
:: 7832 EE659098
::Anything else needs to be rejected.
.ENTER :: ENTER
H#1=I ::Set regist 1 to Num. of rec. in INV file
G#1>995.STOP ::If INV file full, no more entries
S#1>985.WARN ::If INV file almost full, warn user
D$0="\e[2JRM: "+V(2) ::Clear screen and display Room number
::As always, first record is a user
P$0 :: (cont)
D$0="ID: "+V(3) ::Display current identifier
P$0 :: (cont)
P"...Reader ready...\r\n" ::Display input symbol for INV
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
::specified identifier. Main purpose is
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
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".RECNX ::PM number and open loc; record
::to safeguard against inadvertent file
GV(4)=V(5).RECNX ::EE label and open loc; record
GV(5)=V(6).RECNX ::Alternate station #
GV(5)=V(7).RECNX ::Second alternate station #
GV(5)=V(8).RECNX ::Third alternate station #
GV(5)=V(9).RECNX ::Fourth alternate station #
GV(5)=V(10).RECNX ::Fifth alternate station #
GV(5)=V(11).RECNX ::Sixth alternate station #
GV(5)=V(12).RECNX ::Seventh alternate station #
GV(5)=V(13).RECNX ::Eighth alternate station #
.RPT ::In case we need to repeat
::purges. We suggest that user enter
S.CLR ::exception message
P"WARNING...EE label"
B01
D$1="is from VAMC "+V(5) ::Show foreign station
P$1
P"To continue, press" ::Next screen
P"<ENTER>..."
A ::Any char OK
S.CLR
P"Enter '1' to accept"
::something like 'NX'-initials-date
PV(1)
P"or '2' to reject it."
A1 ::Input 1 char
G$0="1".RECNX ::Add to file
G$0="2".ENTER ::Ignore it
G.RPT ::Repeat the question
::
.RECNX :: RECNX
::Add EE number to I
DV(3)=V(1) ::Update variable
::(ex: NX-SAW-9-12-90). If unit times
D$0=V(1) ::Restore register
RI ::File EE number
DV(5)="" ::Clear reg
G.ENTER ::Next scan
::
.NOLOC :: NOLOC
B1101 ::Audible signal
S.CLR ::EE label scanned before
P"Inventory process" ::location
P"must begin with"
::out for inactivity or is turned off,
P"location label."
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=""
::this record will be displayed at
A ::labels
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
::power up time.
.DESC ::Item description
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."
::DH/ISC-Washington@Hampton, Va
::
P"Press <ENTER>..." ::Wait for user resp
A ::Take anything
G.DESC ::Try again
.NOLBL1 ::Continue
D$1=$0 ::Shuffle the string
D$0="MOD:"+$2 ::registers and file
RI ::user inputs
D$0="S/N:"+$3
RI
D$0=$1
::The Variable file (V) is a small file
RI ::Filing complete
.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
::used for scratch variables since
DV(0)="" ::Add prefix
DV(0)=V(1)
DV(1)=""
DV(1)="PM#:"+V(0)
Q ::Return
::
.REVDEL :: REVDEL
H#1=I ::Get last
D#1=#1-1 ::record number
.LP10
::IRL limits numeric and string registers.
G#1=0.START ::Can't go above first LOCATION
S.CLR
C$1=#1 ::Display
D$0=$1+") " ::content of
D$0=$0+I(#1) ::current record
DF(0)=$0 ::Truncate to
D$0=F(0) ::40 char
P$0
P"(D)elete, (Q)uit," ::Get instructions
P"or (C)ontinue..."
::V(0) is a scratch variable
D$0="" ::Clear input buffer
A1
G$0="D".LP20 ::Deletion
G$0="Q".START ::Back to main menu
G$0="C".LP30 ::Next record
P"Error. Must enter"
P"D, Q, or C."
P"To proceed, please"
P"press <ENTER>..."
D$0=""
::V(1) is a scratch variable
A
G.LP10
.LP20 ::Physical deletion
S.CLR
P"Deleting record"
D$0="number "+$1
D$0=$0+"..."
P$0
W5
DI(#1)="*****" ::Deletion marker
::V(2) the last location entered
P"(Q)uit or (C)ont?" ::Get instructions
D$0=""
A1
G$0="C".LP25 ::Continue
G.START ::Back to main menu
.LP25 :: LP25
D#1=#1-1 ::Move file pointer
G.LP10
.LP30 :: LP30
D#1=#1-1 ::Move file pointer
::V(3) the last equipment number entered
G.LP10
::
.XMIT :: XMIT
D$0="ENNX" ::Define data identifier
XMP,$0 ::Transmit data identifier to host system
XMP,I ::Transmit INV file to host device
H#1=I ::Find how many records exist in INV 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
::V(4) contains station number
YMN;1 ::Clear data buffer
.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
::V(5) station number on EE label
G$0=".".START ::If user input is a ".", go back to main menu
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
HI=0 ::Purge of INV file
::SAB/OIFO-Washington@Hampton, VA
::V(6) alternate station number
HV=0 ::Purge of local variable file
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
::V(7) another alternate station number
::
.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
::
::V(8) another alternate station number
.STOP :: STOP
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
::V(9) another alternate station number
S.CLR ::Clear screen
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 file ID to user
D$0=I(0) ::Setup display of file ID
P$0 ::Print file id
::V(10) another alternate station number
W5 ::Wait five seconds to allow view of message
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
::V(11) another alternate station number
B00 ::Sound beep two times
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
::V(12) another alternate station number
SV(2)=$0.CLOC ::Location is open
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
::V(13) last of eight possible alternate
.NLOC :: NLOC
DV(2)=$0 ::Store new current location
RI ::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
:: station numbers
G.ENTER
::
.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
::F(0) is 39 char formatter
G.FNDBL ::Keep looping
.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
::1.9.2001
::
D$1=$0M#4,#3 ::Set $1 to second piece
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 V(5)
OI(1000,40) ::Initialize INV file
::
.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
OV(14,40) ::Initialize variable file
P"Press <ENTER> to"
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
OF(1,39) ::Truncation in REV/DEL
.HLP1Q ::Exit subroutine
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
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
.BEG :: BEG
S.CLR ::No location
P"Inv. process must"
P"begin with a"
P"location label."
W10
Q
::
E ::End of program
DV(4)=""
DV(4)=|ENSTA|
DV(6)="" ::Initialize alternate station
DV(6)=|ENSTA(1)|
::
DV(7)="" ::numbers
DV(7)=|ENSTA(2)|
DV(8)=""
DV(8)=|ENSTA(3)|
DV(9)=""
DV(9)=|ENSTA(4)|
DV(10)=""
DV(10)=|ENSTA(5)|
DV(11)=""
DV(11)=|ENSTA(6)|
::Equipment Inventory Program
DV(12)=""
DV(12)=|ENSTA(7)|
DV(13)=""
DV(13)=|ENSTA(8)|
S.CLR
P"STATION NUMBER:"
PV(4) ::Alternates not shown
P"To continue, please"
P"press <ENTER>..."
A
::File I will hold the identifiers (IEN's)
D$0=""
H#1=I ::Set reg 1 to current rec # in INV file
G#1>0.DAT ::If data already exists, warn user
S.CLR ::Clear screen
P"Please enter ..." ::Ask user for file ID
P"file ID: " :: (cont)
A ::User input of file ID
D$0="ID "+$0 ::Force an entry
RI ::Store file ID into INV file
DV(2)="" ::Initialize V(2)
::of equipment which has been physically
DV(3)=""
::
.START :: START
S.CLR
P"1. Take Inventory"
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 INV
::located. Set up to hold as
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
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
::
|