EXPENDABLE USAGE (2)    BARCODE PROGRAM (446.4)

Name Value
NAME EXPENDABLE USAGE
IDENTIFIER PRCUS
DATA PROCESSOR ROUTINE USAGE-PRCPBALM
IS DEVICE REQUIRED ? YES
LAST DATA PURGE FLAG 1994-04-14 00:00:00
SPECIALTY COMMANDS JANUS2020
GENERIC DOWNLOADING? YES
BARCODE PROGRAM
::RGY/WASHINGTON-ISC@ALTOONA,PA - Expendable Usuage IRL program
::inventory file on barcode reader, the quantity is appended to the end
.LP1Q                            ::     LP1Q
C#2=V(4)                         ::Define current quatity of part
G$3="T".MUL                      ::If operator is "T", multiply numbers
G$3="U".MIN                      ::If operator is a "U", subtract numbers
G$3="".PLUS                      ::If no operator exists, then goto add number
.SET                             ::     SET
C$0=#2                           ::Define current Qty
DV(4)=$0                         ::Define current Qty into local variable file
G.ENTER                          ::Go back and get next inventory record
                                 ::
::of the record.  For example: If 'IE58589 322 18' would be inventory
.MUL                             ::     MUL
D#3=#3*#4                        ::Multiply second number entered and first number entered
D#2=#2+#3                        ::Add Muliplication to current Qty
G.SET                            ::Go and set new quantity
                                 ::
.MIN                             ::     MIN
D#2=#2-#3                        ::Subtract second number enter from current qty
D#2=#2+#4                        ::Add first number enter to current qty
G.SET                            ::Go and set new quantity
                                 ::
::point 58589, part number 322 with a usuage of 18.
.PLUS                            ::     PLUS
D#2=#2+#3                        ::Add second number entered to current qty
D#2=#2+#4                        ::Add first number entered to current qty
G.SET                            ::Go and set new quantity
                                 ::
.STORE                           ::     STORE
QV(2)=""                         ::Quit provided no record
SV(4)="".NOQTY                   ::If not quantity, warn user
D$1=$0                           ::Store record into scratch variable
D$0=V(2)+" "                     ::Create record with quantity
::
D$0=$0+V(4)                      ::  (cont)
RI                               ::Store quanatity into inventory file
D$0=$1                           ::Restore record
DV(2)=""                         ::Initialize record
DV(4)=""                         ::Initialize quantity
Q                                ::Quit subroutine
                                 ::
.RECORD                          ::     RECORD
S.STORE
DV(2)=$0                         ::Store record into scratch variable
OI(1000,20)                      ::Initialize a inventory file
DV(4)=""                         ::Reset QTY
G.ENTER                          ::Goto entry of next record
                                 ::
.REVDEL                          ::     REVDEL
S.CLR                            ::Clear screen
P"How far back do"               ::Ask user how many records to go back
P"you want to go"                ::  (cont)
P"(0 to quit) ? "                ::  (cont)
D$0=""                           ::Initialize input string
N1,2                             ::User input of 1 or 3 numerics
OV(5,20)                         ::Initialize a variable file
G$0="0".START                    ::If input is a 0, go back to main menu
C#2=$0                           ::Put input into numeric variable
H#1=I                            ::Put number of records in inventory file into variable
D#2=#1-#2                        ::Define the record to start display
S.CLR                            ::Clear screen
.LP2                             ::     LP2
G#2=#1.EOTRAN                    ::If all records displayed, ask which record to delete
C$2=#2                           ::Setup display of record
D$0=$2+") "                      ::  (cont)
D$0=$0+I(#2)                     ::  (cont)
                                 ::
P$0                              ::Show record to user
W3                               ::Wait three seconds to allow viewing of record
D#2=#2+1                         ::Increment record counter
G.LP2                            ::Goo get next record
.EOTRAN                          ::     EOTRAN
P"*** END ***"                   ::Display to user End of Records
W5                               ::Wait five seconds for user review of display
S.CLR                            ::Clear screen
P"Which record do you"           ::Asj user shich record to delete
P"want to delete"                ::  (cont)
.BEG                             ::     BEG
P"(0 to quit) ? "                ::  (cont)
D$0=""                           ::Initialize input string
N1,2,3                           ::Allow user input of 1,2 or 3 numberics
G$0="0".START                    ::If user enters a 0, go back to main menu
C#1=$0                           ::Define input as a number
.ASK1                            ::     ASK1
S.CLR                            ::Clear screen
C$0=#1                           ::Setup display of record before deletion
D$0="*** Record "+$0             ::  (cont)
D$0=$0+" ***"                    ::  (cont)
P"\e[2JCurrent Program"          ::Show user program name
P$0                              ::Print display of record
PI(#1)                           ::  (cont)
P"Are you ..."                   ::Ask user for verification before deletion
P"... sure (Y/N) ?"              ::  (cont)
D$0=""                           ::Initialize input string
A1                               ::Allow user input of one character only
G$0=".".START                    ::If input a period, go back to main menu
G$0="N".REVDEL                   ::If input a "N", then ask which record again
G$0="Y".DELREC                   ::If input a "Y", go delete record
B00                              ::Sound beep two times
P"is Expendable Usage"           ::  (cont)
S.CLR                            ::Clear screen
P"*** Error, enter"              ::Tell user a Y or N must be entered
P"a Y or N."                     ::  (cont)
W5                               ::Wait five seconds to allow view of message
G.ASK1                           ::Go back and ask "ok to delete" question
                                 ::
.DELREC                          ::     DELREC
DI(#1)="*Deleted*"               ::Set record in inventory file to null to show deletion
S.CLR                            ::Clear screen
P" "                             ::Tell user the record has been deleted
::Version 3.01, 5/30/90
                                 ::Blank line
P"* Record Deleted *"            ::  (cont)
W5                               ::Wait five seconds to allow view of message
G.REVDEL                         ::Go back and ask what records to view for deletion
                                 ::
.XMIT                            ::     XMIT
D$0="PRCUS"                      ::Define data identifier
XMP,$0                           ::Send data idnetifier to host system
XMP,I                            ::Transmit the inventory file to external device
H#1=I                            ::Find how many records exist in inventory file
C$0=#1                           ::Set string variable to number of records
P"Id: PRCUS"                     ::Print program identifier
D$0="***END***^"+$0              ::Setup End of file message
XMP,$0                           ::Send end of file message to external device
                                 ::
.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
W5                               ::Wait five seconds to allow view of message
G$0="Y".PUR                      ::If user input is a "Y", go and 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
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.ASK                            ::Go back and ask purge question
.PUR                             ::     PUR
H#1=I                            ::Set reg 1 to current rec # in invent file
HI=0                             ::Purge of inventory file
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
                                 ::
.DEL                             ::     DEL
DV(4)=""                         ::Initialize Qty
G.ENTER                          ::Go back to enter inventory record
G#1>0.DAT                        ::If data alread exist in ivent. file warn user
                                 ::
.CLR                             ::     CLR
P"\e[2J"                         ::Clear screen escape sequence
Q                                ::Quit subroutine
                                 ::
.NOREC                           ::     NOREC
B00                              ::Sound beep two times
S.CLR                            ::Clear screen
P"*** Error, enter a"            ::Print error message
P"part number first."            ::  (cont)
S.CLR                            ::Clear screen
W5                               ::Wait five seconds to allow view of message
G.ENTER                          ::Go back to enter inventory record
                                 ::
.WARN                            ::     WARN
B0                               ::Sound beep
P"\e[2J**** WARNING ****"        ::Clear screen andprint 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
P"Please enter ..."              ::Ask user for ID
Q                                ::Quit subroutine
                                 ::
.NOQTY                           ::     NOQTY
B00                              ::Sound beep two times
P"\e[2JWARNING: No qty"          ::Print warning message
P"was entered for"               ::  (cont)
P"part #:"                       ::  (cont)
PV(2)                            ::Print part #
W5                               ::Wait five seconds to allow view of message
Q                                ::Quit subroutine
P"file ID: "                     ::   (cont)
                                 ::
.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
                                 ::
A                                ::User input of user ID
.DAT                             ::     DAT
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
P"The first record in"           ::Display first record to user
P"this file"                     ::  (cont)
D$0="is: "+I(0)                  ::Setup display of first record
D$0="ID"+$0                      ::Set first record to be ID
P$0                              ::Print first record
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 a "N", go to main menu
::
RI                               ::Store first record into inven file
G$0=".".START                    ::If user input is a ".", go to main menu
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 to existing data question
                                 ::
E                                ::End of program
                                 ::
.START                           ::     START
P"\e[2J1. Enter Inventory"       ::Clear screen and print menu
P"2. Transmit Data"              ::  (cont)
P"3. Review/Delete"              ::  (cont)
P"Enter (1-3): "                 ::  (cont)
D$0=""                           ::Initialize input string
A                                ::User input of option
G$0="1".ENTER                    ::If Enter Inventory selected, goto entry of invent.
::V(2) = Record
G$0="2".XMIT                     ::If transmit option selected, goto transmit data
G$0="3".REVDEL                   ::If Review/Delete option selected, goto review and del record
B00                              ::Sound beep two times
S.CLR                            ::Clear screen
P"*** Error, enter a"            ::Print message of invalid input
P"number from 1-3."              ::  (cont)
W5                               ::Wait 5 seconds to allow view of message
G.START                          ::Go back and display main menu
                                 ::
.ENTER                           ::     ENTER
::V(4) = Quantity
H#1=I                            ::Set regist 1 to Num. of rec. in inven file
G#1>995.STOP                     ::If invent. file full, do not allow anymore entries
S#1>985.WARN                     ::If invent. file almost full, warn user
D$0="\e[2J IE: "+V(2)            ::Display current record
P$0                              ::  (cont)
D$0="QTY: "+V(4)                 ::Display Quantity
P$0                              ::  (cont)
P"   # "                         ::Display input symbol for invent.
D$0=""                           ::Initialize input variable
A                                ::Allow user input of next invent. record
::
G$0="F1".DEL                     ::If input is the function key 1, delete record a start over
S$0=".".STORE                    ::Store record
G$0=".".START                    ::If input a ".", goto back to main menu
D$1=$0M2,1                       ::Get code type of entry
G$1="IE".RECORD                  ::If code is "IE", goto entry of new record
G$0="".ENTER                     ::If return entered, don't accept input
GV(2)="".NOREC                   ::If qty entered with no record, goto error message
D#1=0                            ::Initialize character counter
D#3=0                            ::Initialize second number of Qty string
D#4=0                            ::Initialize first number of Qty string
::The barcode label (record) contains the inventory point with the 
D$1=""                           ::Initialize current character (CC) of Qty string
D$2=""                           ::Initialize current string of Qty string
D$3=""                           ::Initialize operand of Qty string
.LP1                             ::     LP1
D#1=#1+1                         ::Increment character counter by 1
D$1=$0M1,#1                      ::Define CC of Qty string
G$1="".LP1Q                      ::If CC of Qty string is null, then end of Qty string and Quit
C#5=$1                           ::Evaluate if CC is a number
CV(0)=#5                         ::  (cont)
GV(0)=$1.NUM                     ::If CC a number, goto save number
::expendable item number.  For example: IE585883 38383.  The user wands the
G$1="T".OPR                      ::If CC a "T", goto save operand string
G$1="U".OPR                      ::If CC a "U", goto save operand string
.ERROR                           ::If CC not a number or operand, then display invalid input
B00                              ::Sound beep two times
S.CLR                            ::Clear screen
P"*** Error, unkown"             ::Print error message
P"operation in entry."           ::  (cont)
W5                               ::Wait five seconds to allow view of message
G.ENTER                          ::Goto entry of next Inventory record
.NUM                             ::     NUM
::label and then enters quantity.  When the record is stored into the
D$2=$2+$1                        ::Define current string of Qty string
C#3=$2                           ::Define second number of Qty string
G.LP1                            ::Go back and get next character of Qty string
.OPR                             ::     OPR
G[$3]>0.ERROR                    ::If a operator alread exists, go to error message
D$3=$1                           ::Define operator string
C#4=$2                           ::Set first number of Qty string to current string
D$2=""                           ::Initialize current string
G.LP1                            ::Go back and get next character
                                 ::