Professional Documents
Culture Documents
4690 Eletronik Journal
4690 Eletronik Journal
(5799-QXL)
Guide to Operations
Created on 6/6/97
1 Created 6/6/97
Second Edition (May, 1997)
This is the second edition of the IBM 4690 Electronic Journal Guide to
Operations. This edition applies to the 4690 Electronic Journal PRPQ 5799-QXL
and to all subsequent releases and modifications until otherwise indicated in
new editions. This edition was created on 6/6/97.
IBM and OS/2 are the registered trademarks of International Business Machines
Corporation.
Windows is a trademark of the Microsoft Corporation.
Table of Contents
i Created 6/6/97
V1R0 IBM 4690 Electronic Journal ii
Created on 6/6/97
Chapter 1 IBM 4690 Electronic Journal - Overview
Application Features
The IBM 4690 Electronic Journal PRPQ (5799-QXL) for the IBM 4690 Point of
Sale system is designed to provide fast access to store level transaction data for
the sales audit staff and the store manager at the store level.
Application Functions
The IBM 4690 Electronic Journal is tailored for your store system through a
series of responses to questions.
The point of sale registers are personalized through a series of panels. There
are store options and terminal options to be specified.
The store options relate to where the journal data is kept and for how long. The
number of days of information kept in the electronic data journal files is a user-
specified parameter. Practical limitations on the number of days saved may be
imposed by the size of the store controller's hard disk files. The application also
provides the ability to compress journal files to take less space. The user can
specify when to trigger the compression of journals automatically. If a journal is
later retrieved for review, it is de-compressed before use.
The electronic journal is selected by date and register number for review. The
program provides scrolling capability to swiftly move through a journal file. The
selected journal can be reviewed as selected, or the user can then use a string
search to locate specific items of interest in the journal.
Sizing Information
The IBM 4690 Electronic Journal application captures the journal image before it
is printed and saves the ASCII image in the Electronic Journal file. Each register
has a separate electronic journal file for each day of activity. The size of the file
is dependent on how many transactions were performed during the day, and
how many print lines were issued for each transaction.
A simple rule of thumb to determine the size of the file for any specific register
would be:
Off-line has different definitions depending on whether your store has a single
controller or uses the multiple controller feature. In a single controller
environment, off-line means that the register is out of communication with the
controller.
If a register is off-line to the File Server, the electronic journal for all transactions
that occur may be spooled to the local controller. When this controller next has
access to the File Server (or becomes the File Server) the local electronic
journal transactions will be despooled into the master copy of the journal.
Other IBM 4690 printers (Models 1 to 4) have a journal station and no internal
memory. In this case, the journal tape is printed automatically when the register
is off-line to the store controller. The decision to print or not print on the journal
is made at the end of the transaction. If the register is online when the
transaction is started, but goes off-line during the transaction, the complete
transaction is printed on the journal roll for security and audit purposes. If the
register comes online during a transaction, the current transaction will not be
printed on the register's journal roll because as far as the register is concerned, it
is online at the critical time.
IBM 4690 Electronic Journal PRPQ executes on both 4680 and 4690 platforms.
Operating Systems:
Application Systems:
Installation
The README file on the first installation diskette contains information on how to
install the Electronic Journal feature. Print the file and perform the steps
indicated to complete the installation. Make sure you check the log for any error
messages as indicated in the README file, and resolve any errors logged.
The personalization options are divided into store options and terminal options.
The store options are used to specify information about the journal files. The
terminal options are used to specify information about the registers and the type
of journals desired. There are application default settings used if the options file
is not updated by the user. The terminal options for register 000 are used to
provide the defaults for the entire store’s registers. Choosing a specific register
number will set the options only for that particular terminal.
From a secondary application menu, select the "IBM 4690 Electronic Journal
Personalization" option. The following panel is displayed. F3 is used to exit the
process.
1. Store Options
2. Terminal Options
F1 F2 F3 QUIT F4 F5
F6 F7 F8 F9 F10
F1 F2 F3 QUIT F4 F5
F6 F7 F8 F9 F10
The user supplies the requested information for each of the fields.
After the options have been selected, press ENTER to update the options file.
F1 F2 F3 QUIT F4 F5
F6 F7 F8 F9 F10
The user supplies the requested information for each of the fields.
Type of Journal The user has three options for normal journal entries.
1 = Electronic Only means that journal information is
only saved electronically.
2 = Paper Only means that journal information is
printed and there is no electronic copy to access.
3 = Both Paper & Electronic means the register
provides both hard copy and an electronic copy
of the journal information.
After the options have been selected, press ENTER to update the options file.
The tailoring options are designed to lead the user through the process of
gathering the information that is important to the installation of the application.
Tailoring allows the application to interface with a wide variety of environments.
On the Command Line of the 4690 operating system, type QXLTAYLR and press
ENTER. The following panel is displayed. F3 is used to exit the process.
==> N
F1 F2 F3 QUIT F4 F5
F6 F7 F8 F9 F10
The user supplies the requested information for each of the fields.
The next panel displays if the user selects MCF=Y and presses ENTER.
Control File Session ==> 91 Spool Session ==> 92 DeSpool Session ==> 93
F1 F2 F3 QUIT F4 F5
F6 F7 F8 F9 F10
The user supplies the requested information for each of the fields.
If a register is off-line to the File Server, the electronic journal for all transactions
that occur may be spooled to the local controller. When this controller next has
access to the File Server (or becomes the File Server) the local electronic
journal transactions are despooled into the master copy of the journal.
Off-line Options:
F1 F2 F3 QUIT F4 F5
F6 F7 F8 F9 F10
F1 F2 F3 QUIT F4 F5
F6 F7 F8 F9 F10
The user can review the options that they have chosen. If there is a conflict with
any of the choices, an error message is displayed. From the error message
panel, the user returns to the first panel in the process.
IBM 4690 Electronic Journal provides a journal review program that makes it
easy to look at the information contained in a journal.
1 Display Journal
2 Print Journal
3 List Journal, by Date
4 List Journal, by Register
F1 F2 F3 QUIT F4 F5
F6 F7 F8 F9 F10
If the user does not know which register journals are available, selections 3 and
4 will provide this information either by register number or activity date.
The user can select either to display the journal or to print a hard copy on the
store controller printer. If the user elects to display the journal, a function key on
the displayed report will allow the user to print a copy after review.
04/28 001
002
003
05/01 001
003
005
05/02 001
002 04/28
003 04/28
05/01
005 05/01
$JJ:428095 Line 1 of 70
100 % read...
--------------------------------------
1453 LAYAWAY 3174 0016 003
LAYAWAY OPENED ON 4/28/95
ACCOUNT 20925
1458- -1457 MDS 1 99.99
1451- -1457 MDS 1 25.00
LAYAWAY FEE 2.00
SUBTOTAL 126.99
4.5% VA.SALES TAX 5.62
TOTAL 132.61
DEPOSIT 32.61
CASH TENDER 32.61
LAYAWAY BAL DUE 100.00
001290830000076150001133200000012409
F1 F2 F3 QUIT F4 PRINT F5
F6 F7 F8 F9 REPEAT F10 SEARCH
Once the user has selected the individual journal for review, 4690 Electronic
Journal reads the journal information and formats the report for display. The
following keys are active to facilitate journal review:
If the user presses F4 while the report is displayed, a hard copy of the entire
journal is sent to the store controller's printer.
If the user presses F10 to initiate a search, the following panel is displayed.
$JJ:428095 Line 1 of 70
100 % read...
--------------------------------------
1453 LAYAWAY 3174 0016 003
LAYAWAY OPENED ON 4/28/95
ACCOUNT 20925
1458- -1457 MDS 1 99.99
1451- -1457 MDS 1 25.00
LAYAWAY FEE 2.00
SUBTOTAL 126.99
4.5% VA.SALES TAX 5.62
TOTAL 132.61
DEPOSIT 32.61
CASH TENDER 32.61
LAYAWAY BAL DUE 100.00
001290830000076150001133200000012409
The % read indicator in the upper righthand portion of the panel shows how
much of the journal has been read into memory. For fast access, only a portion
of the journal is read and displayed. As more of the journal is requested by
paging operations, more of the journal is read. This is a productivity feature.
The user can enter a string of characters to match during the search operation.
The character string is not case-sensitive, which means that upper- and
lowercase letters are treated the same. The user presses the ENTER key after
keying the character string. The program then searches for the next occurrence
of the string data. The journal display is refreshed with the matching information
shown on the first data line of the display.
By pressing the F9 key, the same search can be repeated multiple times. The
character string is not automatically reset to allow the user to page through the
entire journal.
Overview
The IBM 4690 Electronic Journal Feature must be integrated into your POS
terminal application. At the appropriate points in your application you must
insert calls to the entry points in the Electronic Journal Feature. If you use the
General Sales Application or the Supermarket Application these calls are
inserted in your terminal user exits. If you use the Chain Sales Application, then
changes to the source are required.
Once you have changed and re-compiled the appropriate terminal sales
application modules you must re-link your terminal sales application with an
Electronic Journal Link Library.
The Electronic Journal Feature also provides a User Exit module. When you
link your terminal sales application you must include an object module for the
User Exit Module.
The ‘Journal’ function calls QXLEXIT1, before it adds a line to the electronic
journal. This gives the user the opportunity to modify the text before it is saved.
If a null string is returned then this line will not be included in the electronic
journal at all.
QXLEXIT1 = PrintLine
FEND
The ‘Journal’ function calls QXLEXIT2, after it adds a line to the electronic
journal and before it returns to the caller. The purpose of this exit is to allow you
to force the line to be printed on the paper journal regardless of the print option
you selected for this register. The default is not to print the line. If QXLEXIT2
returns anything other than a null string, then the line of information is printed on
the physical journal. The default QXLEXIT2 code is:
QXLEXIT2 = ""
IF PaperOn THEN QXLEXIT2 = PrintLine
FEND
On one of the Integration diskettes you will find a directory named “EAL”, which
contains the following GSA User Exit modules:
EALTSU06.BAS
EALTSU15.BAS
EALTSU16.BAS
You may copy these files into your development directory. You must either use
these user exits or integrate their contents into your version of the user exit. Be
careful copying the sample user exits onto your system since you may overlay
your system’s user exits.
If you do not use the source files provided with the Electronic Journal Feature,
do the following:
2.
In module EALTSU06, insert the following code after the
FUNCTION PRINT.EXIT$ statement:
ON.ENTRY.TO.EXIT:
IF sta.sess.id = 23 THEN CALL Journal.Before(line.type,prt.line$)
START.EXIT.PROCESSING:
The ‘Journal’ function puts the information in the electronic journal, and
determines whether the data needs to be printed on the physical journal. If
the Journal function returns a null, then the data does not need to be printed,
otherwise it does.
4. In the module EALTSU15, insert the lines that appear in bold text.
%ENVIRON T
FUNCTION CheckJournalFile EXTERNAL
FEND
FUNCTION CHECK.OFFLINE external
FEND
FUNCTION TRAN.TO.EXIT PUBLIC
INTEGER*2 TRAN.TO.EXIT
call checkjournalfile
call CHECK.OFFLINE
END FUNCTION
5. In the module EALTSU16, insert the lines that appear in bold text.
Substitute the session number that you want the IBM 4690 Electronic Journal
to use for option files.
%ENVIRON T
INTEGER*2 GLOBAL QXL.SESSION
Copy the QXL*.* files from the root subdirectory of the first Integration Diskette
into the ADX_UPGM directory. From the EAL subdirectory copy the correct L86
files from the chart below (previously identified by executing the steps identified
in Chapter 3).
Add to your INP file an entry for QXLEXITS and an entry for the L86 file you
have chosen. Issue the LINK86 command to link your terminal application.
Follow this with a POSTLINK command.
After linking and postlinking, copy the terminal load file to ADX_IPGM and
distribute the file (compound on close) if using a Local Area Network (LAN). This
must be done for all applications.
The IBM 4690 Electronic Journal will intercept all writes to the journal that pass
through PRINT.EXIT$. If in any of your user exit code you write directly to the
journal, the Electronic Journal will not be able to intercept the print lines. The
text is written onto the paper journal, and is not logged to the electronic journal.
In order to avoid this, when your application writes to the journal, instead of
issuing a “WRITE FORM”, it should use the following function call:
!******************************************************************************
! Definition of Journaling Routine
!******************************************************************************
FUNCTION Journal(Print.line$) EXTERNAL
STRING Journal, Print.line$
FEND
!******************************************************************************
! 1. Precede Print line with a two-byte ASCII field that contains the
! number of lines to advance after printing
! 2. Call Journal
! 3. Check return status:
! If the line was logged to the electronic journal, and it should
! not be printed, a null string will be returned,
! Otherwise, print the line to the journal directly.
!******************************************************************************
Print.line$ = RIGHT$(“0”+STR$(ADVANCE%),2) + Print.line$
Print.line$ = Journal(Print.line$)
IF LEN(Print.line$) <> 0 THEN BEGIN
Print.line$ = RIGHT$(Print.line$,LEN(Print.line$)-2)
FORMAT$ = “C” + STR$(LEN(Print.line$))+”,A” + \
STR$(“0”+STR$(ADVANCE%,2))
WRITE FORM FORMAT$ ; #23 ; Print.line$
ENDIF
On one of the Integration diskettes you will find a directory named “EAM”, which
contains the following User Exit modules:
EAMTSUSU.J86
EAMTSU01.J86
EAMTSU02.J86
EAMTSU04.J86
EAMTSU05.J86
EAMTSU07.J86
EAMTSU14.J86
EAMTSU18.J86
EAMTSU21.J86
EAMTSU54.J86
You may copy these files into your development directory. You must either use
these J86 files to compile EAMTSUPC, or you must integrate the contents of
these J86 files into your versions of these user exits.
Note that in calling User Exit 7, you need to pass a session number. This
session number is used to open the IBM 4690 Electronic Journal options files at
execution time. Important: Select a session number that is not used anywhere
else in the terminal sales application.
!*********************************************************************
!
! The session number specified here will be used by
! IBM 4690 Electronic Journal
! Make sure that it is not in conflict with any other session numbers
! It will be used to access disk files on the controller
!
!*********************************************************************
FUNCTION QXL.SESS.NO PUBLIC
INTEGER*2 QXL.SESS.NO
QXL.SESS.NO = 99 ! Session Number to use for personalization
FEND
CALL QXL.TSUPEC01
CALL QXL.TSUPEC02
CALL QXL.TSUPEC04
CALL QXL.TSUPEC05
CALL QXL.TSUPEC07
CALL QXL.TSUPEC14
CALL QXL.TSUPEC18
STRING PrtLine
The ‘Journal’ function puts the information in the electronic journal, and
determines whether the data needs to be printed on the physical journal. If
the Journal function returns a null, then the data does not need to be printed;
otherwise, it does.
CALL QXL.TSUPEC54
Once you have re-compiled EAMTSUPC, re-link your terminal module with
QXLEXITS and with the Electronic Journal L86 file that contains the features
that you plan to use. The L86 files are in the EAM directory on one of the
Integration diskettes. If you perform the Tailoring function it will tell you, based
on your feature selections, which L86 file to use.
Copy the QXL*.* files from the root subdirectory of the first Integration Diskette
into the ADX_UPGM directory. From the EAM subdirectory copy the correct L86
files from the chart below (previously identified by executing the steps identified
in Chapter 3).
Add to your INP file an entry for QXLEXITS and an entry for the L86 file you
have chosen. Issue the LINK86 command to link your terminal application.
Follow this with a POSTLINK command.
After linking and postlinking, copy the terminal load file to ADX_IPGM and
distribute the file (compound on close) if using a Local Area Network (LAN). This
must be done for all applications.
Compile EAMTSUPC.
If using EAMTS10L.INP copy EAMTSUPC.OBJ to EAMTSUPC.LBJ prior to
re-linking the terminal sales application.
The IBM 4690 Electronic Journal intercepts all writes to the journal that pass
through User Exit 21. If in any of your user exit code you write directly to the
journal, the Electronic Journal will not be able to intercept the print lines. The
text is written onto the paper journal, and is not logged to the electronic journal.
In order to avoid this, when your application writes to the journal, instead of
issuing a “WRITE FORM”, it should use the following function call:
!******************************************************************************
! Definition of Journaling Routine
!******************************************************************************
FUNCTION Journal(Print.line$) EXTERNAL
STRING Journal, Print.line$
FEND
!******************************************************************************
!! 1. Call Journal, passing line to be printed
! 2. Check return status:
! If the line was logged to the electronic journal, and it should
! not be printed, a null string will be returned,
! Otherwise, print the line to the journal directly.
!******************************************************************************
Print.line$ = Journal(Print.line$)
IF LEN(Print.line$) <> 0 THEN BEGIN
WRITE FORM “C38A1” ; #36 ; Print.line$
ENDIF
You must ensure that the terminal application source code is modified so that
the EJ routines are called. Directions for these changes are found in
“Programming Information for Chain Sales” in this appendix. Note that this step
is not necessary if level 9701 of the CSA application has been installed. As
necessary, issue the compile.
Copy the QXL*.* files from the root subdirectory of the first Integration Diskette
into the ADX_UPGM directory. From the EGH subdirectory on the second
Integration Diskette copy the correct L86 files from the chart below (previously
identified by executing the steps identified in Chapter 3).
Add to your INP file an entry for QXLEXITS, or replace the EGHTNOEJ entry
with QXLEXITS (QXLEXITS.LBJ for big memory model), and add an entry for the
L86 file you have chosen. Issue the LINK86 command to link your terminal
application. Follow this with a POSTLINK command.
After linking and postlinking, copy the terminal load file to ADX_IPGM and
distribute the file (compound on close) if using a Local Area Network (LAN). This
must be done for all applications.
Some changes need to be made to the following terminal source code modules:
EGHTCKOT
EGHTLWAY
EGHTMAIN
EGHTRCAL
EGHTSUBB
In addition, all direct writes to the summary journal need to be replaced by a call
to the Journal routine. The Journal FUNCTION will return a string; the string will
either be NULL or it will be identical to the input string. If the Journal returns a
null, don't print this line on the summary journal; otherwise, go ahead and print it.
The reason for this is that journal personalization allows you to continue to
create a paper journal in addition to the electronic journal.
In all modules that have direct writes to the SJ: session include the following
external reference:
!*****************************************************************
! FUNCTION: Journal
!*****************************************************************
! Prtline is 40 bytes long.
! The first two bytes contain the number of lines to be skipped
! after printing.
! The remaining 38 bytes are the text to be printed
!
! If Journal returns a Null string, then don't print to the
! paper journal, otherwise do.
!*****************************************************************
old.code:
gl.temp1$ = “Line of text”
write form "C38A01"; #sess.printsj; gl.temp1$
new.code:
!****************************************************************
! ELECTRONIC JOURNAL START
!****************************************************************
! FUNCTION: JOURNAL.TOTAL
!****************************************************************
! called when the transaction total has been computed
!****************************************************************
FUNCTION JOURNAL.TOTAL(TOTAL.AMT$) EXTERNAL
STRING TOTAL.AMT$
FEND
!*****************************************************************
! ELECTRONIC JOURNAL STOP
!*****************************************************************
In the subroutine TOTAL insert the bold text: (marked with ==>)
SUB TOTAL
INTEGER*2 I
INTEGER*1 W.FCFLAG ! flag for foreign currency !IR85937
INTEGER*4 W.TENDPREV ! save for foreign curr prt !IR85937
INTEGER*4 W.TENDAMT ! foreign amount tendered !IR85937
INTEGER*4 W.SAVEFAMT ! save foreign amount due !IR85937
INTEGER*4 W.SAVEAAMT ! save american amount due !IR85937
PD.DISCPROG = GL.OFF
PD.TRANTYPE = GL.TRANTYPE
!EIR89346 END POST DISCOUNT
W.FOREIGN: ! !IR85937
W.FCFLAG = GL.OFF ! clear foreign currency flag !IR85937
GOTO TND.END !
ENDIF !
TND.20:
IP.DATA1$ = "2000" ! force 20.00 into kybd buffer
GL.TENDTYP = 1 ! set subscript for cash tender
GOTO TND.OK
TND.10:
IP.DATA1$ = "1000" ! force 10.00 into kybd buffer
GL.TENDTYP = 1 ! set subscript for cash tender
GOTO TND.OK
TND.5:
IP.DATA1$ = "500" ! force 5.00 into kybd buffer
GL.TENDTYP = 1 ! set subscript for cash tender
GOTO TND.OK
TND.1:
IP.DATA1$ = "100" ! force 1.00 into kybd buffer
GL.TENDTYP = 1 ! set subscript for cash tender
GOTO TND.OK
TND.TYP1:
GL.TENDTYP = 1 ! set subscript for tend type 1
GOTO TND.OK
TND.TYP2:
GL.TENDTYP = 2 ! set subscript for tend type 2
GOTO TND.OK
TND.TYP3:
GL.TENDTYP = 3 ! set subscript for tend type 3
GOTO TND.OK
TND.TYP4:
GL.TENDTYP = 4 ! set subscript for tend type 4
GOTO TND.OK
TND.TYP5:
GL.TENDTYP = 5 ! set subscript for tend type 5
GOTO TND.OK
TND.TYP6:
GL.TENDTYP = 6 ! set subscript for tend type 6
GOTO TND.OK
TND.TYP7:
GL.TENDTYP = 7 ! set subscript for tend type 7
GOTO TND.OK
TND.OK:
\!AIR85937
REM*****************************************
REM if foreign currency flip back to American equivalent
REM*****************************************
IF W.FCFLAG THEN BEGIN
IF GL.TENDAMT = 0 THEN \ if tender amt = 0
IF SO.TENDFLAG(GL.TENDTYP) AND 0040H THEN\ auto bal due allow
GL.TENDAMT = W.SAVEFAMT \ tender amt = tender bal due
ELSE \ else
CALL ERRMSG (52) :\ display zero amount error
GOTO TND.END ! skip to end
!AIR75331
!AIR83961 IF GL.NEGBALDUE = GL.ON THEN !
! GL.BALAMT = GL.BALAMT + GL.TENDAMT !
!EIR83961 ELSE !
GL.BALAMT = GL.BALAMT - GL.TENDAMT !
!EIR75331
! if over-tendered by
\!AIR85937
REM*****************************************
REM if foreign currency print foreign amount due
REM followed by exchange rate
REM*****************************************
IF W.FCFLAG THEN \
BEGIN !
GL.TEMP1I4 = ?FOREIGN(W.TENDPREV)!
IF GL.NEGBALDUE = GL.ON THEN \ if bal due negative
GL.TEMP1I4 = -GL.TEMP1I4
GL.PRTLINE$ = " " + \ build total print line
"FOREIGN CURR TOTAL" + \
?FORMAT.AMOUNT$(GL.TEMP1I4) !
CALL PRINTER (PRD0J1C1) ! print it
GL.TEMP2I2 = LEN(GL.TEMP1$) !
FOR GL.TEMP1I2 = GL.TEMP2I2 TO 5 STEP -1
IF RIGHT$(GL.TEMP1$,1) = "0" THEN \
GL.TEMP1$ = LEFT$(GL.TEMP1$,(GL.TEMP1I2 -1)) :\
ELSE \
GL.TEMP1I2 = 3 !set to get out of loop
NEXT GL.TEMP1I2 !
\!AIR85937
REM*****************************************
REM if foreign currency flip tender amount to foreign equivalent
REM*****************************************
IF GL.NEGBALDUE = GL.ON THEN \ if bal due is negative
W.TENDAMT = -W.TENDAMT :\ reverse sign on tend amt
W.SAVEAAMT = -W.SAVEAAMT ! reverse sign on tend amt
IF W.FCFLAG THEN \
GL.TENDAMT = W.TENDAMT
\!EIR85937
\!AIR85937
REM*****************************************
REM if foreign currency flip back to American equivalent
REM*****************************************
IF W.FCFLAG THEN \
CALL ADD4TOT(W.TENDAMT,AC.OFF.FOREIGN) :\ add tend amt to foreign
GL.TENDAMT = W.SAVEAAMT
\!EIR85937
\!AIR85937
REM*****************************************
REM if foreign currency flip back to Foreign equivalent
REM*****************************************
IF W.FCFLAG THEN \
GL.TENDAMT = W.TENDAMT
\!EIR85937
TOT.END:
EXIT SUB
TND.AMTPROMPT:
GL.AMTPROMPT$ = LEFT$(TD.TDSC$(103),6) + \ build total display
?FORMAT.AMOUNT$(GL.TENDDUE) !
IF GL.NEGBALDUE = GL.ON THEN \ if bal due negative
GL.AMTPROMPT$ = LEFT$(GL.AMTPROMPT$,15) + "-" !
RETURN
\!AIR85937
W.CALCFAMT:
W.SAVEAAMT = GL.TENDDUE !
W.CALCFAMT1:
GL.TEMP1I4 = ?FOREIGN(W.SAVEAAMT) !
W.SAVEFAMT = GL.TEMP1I4 !
RETURN
\!EIR85937
END SUB
!****************************************************************
! ELECTRONIC JOURNAL START
!****************************************************************
! FUNCTION: JOURNAL.TOTAL
!****************************************************************
! called as total is about to be printed
!****************************************************************
FUNCTION JOURNAL.TOTAL(TOTAL.AMT$) EXTERNAL
STRING TOTAL.AMT$
FEND
!****************************************************************
! ELECTRONIC JOURNAL STOP
!****************************************************************
In the LWAY.PAYMENT subroutine add the bold text: (marked with ==>)
SUB LWAY.PAYMENT PUBLIC
INTEGER*2 I
!IR80907
IF (IP.FCODE2 = KB.TOTAL) AND \IF TOTAL KEY BUT NOT
(IP.FCODE8 <> KB.VOID) THEN \VOID KEY, DISPLAY
CALL ERRMSG (3) :\ KEYING SEQ ERR MSG
GOTO LWAY.PAY.PROMPT ! AND TRY AGAIN
!IR80907
END SUB
!****************************************************************
! ELECTRONIC JOURNAL STOP
!****************************************************************
After the open of the journal station insert a call to Journal.Init. The parameter
passed to Journal.Init is a session number that must not be used anywhere
else in the terminal sales application.
!***************************************************************
! ELECTRONIC JOURNAL START
!***************************************************************
CALL Journal.Init(95)
!***************************************************************
! ELECTRONIC JOURNAL STOP
!***************************************************************
!****************************************************************
! ELECTRONIC JOURNAL START
!****************************************************************
! FUNCTION: JOURNAL.TOTAL
!****************************************************************
! called as total is about to be printed
!****************************************************************
FUNCTION JOURNAL.TOTAL(TOTAL.AMT$) EXTERNAL
STRING TOTAL.AMT$
FEND
!****************************************************************
! ELECTRONIC JOURNAL STOP
!****************************************************************
In the SUB RECALL in the END.OF.TRANS routine insert the code that appears
in bold text: (marked with ==>)
END.OF.TRANS:
IF K > 0 THEN \
BEGIN
FOR L = 0 TO K-1
LOOP = TAXARR(L)
GL.TAXFLAG = VAL(UNPACK$(MID$(TL.ARRAY$(LOOP),2,1))) ! flag
GL.TAXM = VAL(UNPACK$(MID$(TL.ARRAY$(LOOP),3,4))) ! tax amount
IF GL.TAXFLAG AND 01H THEN \
GL.TEMP2I1 = 3 \
ELSE \
IF GL.TAXFLAG AND 02H THEN \
GL.TEMP2I1 = 2 \
ELSE \
IF GL.TAXFLAG AND 04H THEN \
GL.TEMP2I1 = 1 \
ELSE \
IF GL.TAXFLAG AND 08H THEN \
GL.TEMP2I1 = 0
IF GL.TAXFLAG AND 010H THEN \
GL.PRTLINE$ = " "+ \ build tax line
TD.TDSC$(149)+" "+ \
?FORMAT.AMOUNT$(GL.TAXM) :\
CALL PRINTER (PRD0J1C1) :\ print it
ELSE \
GL.PRTLINE$ = " "+ \ build tax line
TX.DESC$(GL.TEMP2I1) + \
RIGHT$(?FORMAT.AMOUNT$(GL.TAXM),8) :\
CALL PRINTER (PRD0J1C1) ! print it
NEXT L
ENDIF
IF I > 0 THEN \
BEGIN
FOR J = 0 TO I-1
LOOP = TENDARR(J)
GL.TENDTYP = VAL(UNPACK$(MID$(TL.ARRAY$(LOOP),2,1))) ! type
GL.TEMP1I1 = VAL(UNPACK$(MID$(TL.ARRAY$(LOOP),3,1))) ! flag
GL.TENDAMT = VAL(UNPACK$(MID$(TL.ARRAY$(LOOP),4,4))) ! amount
IF GL.TEMP1I1 AND 08H THEN \
GL.TENDAMT = -GL.TENDAMT !
GL.PRTLINE$ = " " + \ build tender prt line
SO.TENDDESC$(GL.TENDTYP) + \
?FORMAT.AMOUNT$(GL.TENDAMT) !
CALL PRINTER (PRD0J1C1) ! print it
NEXT J
ENDIF
DIM TENDARR(0)
DIM TAXARR(0)
GL.INDICAT1 = GL.INDICAT1 AND 0FFFBH ! turn off suspend flg
GL.RECALL = GL.ON
EXIT SUB
!****************************************************************
! ELECTRONIC JOURNAL START
!****************************************************************
! Prtline is 40 bytes long.
! The first two bytes contain the number of lines to be skipped
! after printing.
! The remaining 38 bytes are the text to be printed
!
! If Journal returns a Null string, then don't print to the
! paper journal, otherwise do.
!****************************************************************
!****************************************************************
! called as header is about to be printed--this is the start
! of a transaction.
!****************************************************************
FUNCTION JOURNAL.HEADER EXTERNAL
FEND
!****************************************************************
! called after trailer has been printed--this is the end
! of a transaction.
!****************************************************************
FUNCTION JOURNAL.TRAILER EXTERNAL
FEND
!****************************************************************
! called at keyboard timeout if between transactions
! if the terminal has returned online any spooled
! transactions will be written to the controller
!****************************************************************
FUNCTION CHECK.OFFLINE EXTERNAL
FEND
!****************************************************************
! ELECTRONIC JOURNAL STOP
!****************************************************************
PRT.TESTDI:
PRT.TEMPI4 = GETLONG(SESS.PRINTDI) ! get printer status
IF ((PRT.TEMPI4 AND 00000010H) <> 0) AND \ if doc inserted and
((PRT.TEMPI4 AND 00000020H) = 0) THEN \ di throat closed
GOSUB PRT.RSTDISP :\ restore disp if needed
ELSE \
IF PRT.DISPFLAG = GL.OFF THEN \ first pass only
begin !
TCLOSE SESS.PRINTCR ! wait for all cr prts
WRITE FORM "C38A00"; #SESS.PRINTCR; \ blank print to over-
LEFT$(GL.BLANKS$,38) ! ride tclose problem
ENDIF :\
GOSUB PRT.SAVDISP :\ save disp if needed
GL.DISPLINE$ = "C013 "+TM.TMSG$(13) :\ insert form msg
CALL DISPLAY (1,1,40) :\ display it
WAIT ;500 :\ wait
GOTO PRT.TESTDI ! try again
ENDIF
EXIT SUB
PRINTCR:
PRT.WRKPARM = PRT.SAVPARM AND 0007H ! get cr feed bits
IF PRT.WRKPARM = 7 THEN \ if eject (7 feeds)
PRT.WRKPARM = 8 ! need 8 for eject
PRT.FORM$ = "C38A0" + STR$(PRT.WRKPARM) ! format string
WRITE FORM PRT.FORM$; # SESS.PRINTCR; GL.PRTLINE$ ! prt at CR
!AIR81483
IF MONITORING = GL.ON THEN \ if term monitor on
CALL MONITOR ("P",RIGHT$(PRT.FORM$,2)+GL.PRTLINE$) ! write data
!EIR81483
RETURN
PRINTSJ:
PRT.WRKPARM = PRT.SAVPARM AND 0070H ! get sj feed bits
PRT.WRKPARM = SHIFT(PRT.WRKPARM,4) ! shift sj line feeds
IF PRT.WRKPARM = 7 THEN \ if eject (7 feeds)
PRT.WRKPARM = 8 ! need 8 for eject
PRT.FORM$ = "C38A0" + STR$(PRT.WRKPARM) ! format string
==> !**********************************************************
==> ! ELECTRONIC JOURNAL START
==> !**********************************************************
==> IF Journal(RIGHT$("00"+STR$(PRT.WRKPARM),2) + \
==> GL.PRTLINE$) <> "" THEN \ !
==> WRITE FORM PRT.FORM$; # SESS.PRINTSJ; GL.PRTLINE$ ! prt at SJ
==> !**********************************************************
==> ! ELECTRONIC JOURNAL STOP
==> !**********************************************************
RETURN
PRINTDI:
IF ((PRT.SAVPARM AND 0700H)=0700H) THEN \ if eject requested
BEGIN !
PRT.WRKPARM = 1 ! set 1 line feed
ENDIF \
ELSE \
BEGIN !
PRT.WRKPARM = PRT.SAVPARM AND 0700H ! get di feed bits
PRT.WRKPARM = SHIFT(PRT.WRKPARM,8) ! shift di line feeds
ENDIF !
RETURN
PRT.EJECT:
PRT.TEMPI4 = GETLONG(SESS.PRINTDI) ! get printer status
IF ((PRT.TEMPI4 AND 00000010H) <> 0) THEN \ if doc inserted
IF PRT.DISPFLAG = GL.OFF THEN \ first pass only
begin !
TCLOSE SESS.PRINTDI ! wait for all di prts
WRITE FORM "C38A00"; #SESS.PRINTCR; \ blank print to over-
LEFT$(GL.BLANKS$,38) ! ride tclose problem
ENDIF :\
GOSUB PRT.SAVDISP :\ save display if needed
GL.DISPLINE$= "C034 "+TM.TMSG$(34) :\ remove form msg
CALL DISPLAY (1,1,40) :\ display it
WAIT ;500 :\ wait
GOTO PRT.EJECT \ try again
ELSE \
GOSUB PRT.RSTDISP :\ restore disp if needed
PUTLONG SESS.PRINTCR,00000020H :\ do not allow doc
WRITE FORM "C38A01"; #SESS.PRINTCR; \ blank print to open
LEFT$(GL.BLANKS$,38) ! DI throat !AIR69901
ENDIF !
RETURN
PRT.SAVDISP:
IF PRT.DISPFLAG = GL.OFF THEN \ disp not saved ?
LOCATE # SESS.DISPLAY; 1, 1 :\ locate pos 1
READ FORM "C40"; # SESS.DISPLAY; PRT.DISPLAY$:\ read display
LOCATE # SESS.DISPLAY; 1, 1 :\ reset pointer
PRT.DISPFLAG = GL.ON ! set saved on
RETURN
PRT.RSTDISP:
IF PRT.DISPFLAG = GL.ON THEN \ disp saved ?
LOCATE # SESS.DISPLAY; 1, 1 :\ locate pos 1
WRITE FORM "C40" ; # SESS.DISPLAY; PRT.DISPLAY$:\ restore disp
PRT.DISPFLAG = GL.OFF ! set saved off
RETURN
END SUB
==> !***********************************************************
==> ! ELECTRONIC JOURNAL START
==> !***********************************************************
==> CALL JOURNAL.HEADER
==> !***********************************************************
==> ! ELECTRONIC JOURNAL STOP
==> !***********************************************************
HDR.NOMSG:
GL.TEMP1$ = UNPACK$(SP.SPID$) ! get s'per id
GL.TEMP1$ = RIGHT$(GL.TEMP1$,GL.SPERLEN) ! sig digits only
GL.TEMP1$ = LEFT$(GL.TEMP1$+GL.BLANKS$,10) ! pad right w/ blanks
GL.TEMP2$ = RIGHT$("00"+STR$(GL.TRANTYPE),2) ! tran type
GL.TEMP3$ = RIGHT$("000"+STR$(GL.TRANSNUM),4)! tran number
GL.TEMP4$ = RIGHT$(GL.TERMNUM$,3) ! terminal number
END SUB
TRL.NOMSG:
==> !*******************************************************
==> ! ELECTRONIC JOURNAL START
==> !*******************************************************
==> CALL JOURNAL.TRAILER
==> !*******************************************************
==> ! ELECTRONIC JOURNAL STOP
==> !*******************************************************
END SUB
!AIR90602
INTEGER*2 bannering ! 1 = I am bannering
INTEGER*2 ban.inp.state ! input state
INTEGER*2 ban.work ! work field
INTEGER*2 ban.length ! length of banner message
INTEGER*2 ban.msg.pos ! position in the banner I'm at
INTEGER*2 ban.first.pass ! first pass switch
INTEGER*2 ban.steps.per.sec ! steps per second
INTEGER*2 wait.time ! wait time
INTEGER*2 inp.bantime ! banner wait time counter
STRING ban.message$ ! banner message
!EIR90602
INP.LOCKTIME = 0
!AIR90602
REM********************************************************
REM set up for bannering
REM********************************************************
ban.inp.state=inp.state ! save input state
gosub setup.banner ! go setup banner
!EIR90602
INP.WAIT:
GL.ERRCODE$ = GL.NULL$ ! clear error code !IR70452
IF (GL.MSR.INPUT = GL.ON) AND \ if msr input valid and
(GL.MSR.OPEN = GL.ON) THEN \ msr is opened
WAIT SESS.KEYBOARD,SESS.MSR; wait.time \ wait for kybd !CIR90602
ELSE \
WAIT SESS.KEYBOARD; wait.time ! wait for kybd input !CIR90602
INP.MSR.RECD:
INP.KYBD.RECD:
INP.EXIT:
!AIR90602
if bannering=1 then BEGIN \ right state ?
ban.message$="" ! remove string
bannering=0 ! null switch
old.line=gl.ban.line ! set line
old.disp=gl.ban.disp ! set disp
ban.first.pass=1
gosub display.line ! go clear line
ENDIF
!EIR90602
EXIT SUB
!AIR90602
construct.msg:
gl.ban.display$=gl.ban.msg$(gl.msg.to.do) ! get msg
!AIR93603 ban.work=match("|",gl.ban.display$,1) ! find end char
!AIR93603 if ban.work>1 then gl.ban.display$=left$(gl.ban.display$,ban.work-1) ! remove
extra
ban.message$=string$(gl.ban.size-1," ")+gl.ban.display$ ! pad with blanks
ban.length=len(ban.message$) ! get message length
ban.message$=ban.message$+left$(gl.ban.display$,gl.ban.size) ! add extra
return
get.next.msg.nmbr:
gl.msg.to.do=gl.msg.to.do+1 ! step to next msg
if gl.msg.to.do>10 then \ past last msg ?
gl.msg.to.do=1 ! yes
if gl.ban.msg$(gl.msg.to.do)="" then begin ! null msg ?
loop.limit=1 ! set loop limit
while gl.ban.msg$(gl.msg.to.do)="" and loop.limit<11 ! loop till non-null found
loop.limit=loop.limit+1 ! count this loop
gl.msg.to.do=gl.msg.to.do+1 ! step to next msg
if gl.msg.to.do>10 then \ past last msg ?
gl.msg.to.do=1 ! yes
wend
endif
return
display.line:
if ban.first.pass=1 or gl.msg.changed=1 then begin
gl.displine$=string$(20," ") ! blank line
if old.disp=1 then \ oper display ?
call display (old.line,1,20) \ display msg
else \ cust display ?
call display2(old.line,1,20) ! display msg
endif else begin !
if gl.ban.disp=1 then \ oper display ?
call display (gl.ban.line,gl.ban.pos,gl.ban.size) \ display msg
else \ cust display ?
call display2(gl.ban.line,gl.ban.pos,gl.ban.size) ! display msg
old.disp=gl.ban.disp:old.line=gl.ban.line
endif
return
!EIR90602
!AIR70452 The following code was made a Gosub routine for this apar
INP.REUNLOCK:
IF GL.PRIORITY = GL.ON THEN \
UNLOCKDEV SESS.KEYBOARD,IP.MAJOR,PRIORITY \ unlock maj state
ELSE \
GL.TEMP1I4 = GETLONG(SESS.KEYBOARD) :\ get kbd stat !IR70452
IF GL.TEMP1I4 AND 01000000H THEN \ if locked !IR70452
UNLOCKDEV SESS.KEYBOARD,IP.MAJOR ! unlock maj state
RETURN
!EIR70452
END SUB