You are here: Development Standards > Routines > Application-SpecificRoutines > GLAUDIT.PUB

# GLAUDIT.PUB

GLAUDIT.PUB is a public program that handles a variety of functions for the GL Account Audit Report. This program is called by RMPRAUD and RMPRAUD1, and handles all GL accounts found in the General Ledger module.

FILE_CHECK:

This entry point returns the total number of files in General Ledger that has GL Accounts in them.

`1010 FILE_CHECK:`
`1030 ENTER APPFILES`

Variable | Description
APPFILES | The number of data files to audit

Exit Points | Explanation
EXIT | FILE_CHECK normally exits with no error.

FILE_DATA:

This entry point will set the exact file names into an array and return those names to the calling program, which will in turn open the returned files.

`1510 FILE_DATA:`
`1530 ENTER APPFILES,DATAFILE$[ALL]`

Variable | Description
APPFILES | Number of files that contains GL Accounts (retrieved from using the FILE_CHECK entry point)
DATAFILE$[ALL] | A two-dimensional array dimensioned to DATAFILE$[1:APPFILES,1:2] DATAFILE$[x,1] = Name of file to be opened DATAFILE$[x,2] = “1” if file is encrypted, ““ if not

AUDIT:

This entry point will perform the auditing of data files within General Ledger.

`2010 AUDIT:`
`2030 ENTER GLMA,MSG$,OUTPUT$,FILE[ALL],TEMPLATE$[ALL]`

Variable | Description
GLMA | FILE[GLMA] element the GLMAx file is opened on
MSG$ | Returns an error message if audit was able to perform
OUTPUT$ | Template hodling print information for report
FILE[ALL] | Standard file array
TEMPLATE$[ALL] | Array holding each string template of the corresponding files returned from the FILE_DATA entry point. Each template is on an index that corresponds to the FILE[ALL] array where the file is opened on

The OUTPUT$ template has the following format:

Field | Description
PCHAN:N(3*) | Output channel for report (Set to variable F)
DATE:C(10*) | Current workstation date
TIME:C(8*) | Current OS time
CNAME:C(40*) | Company Name
TITLE:C(40*) | Title of report (Set to variable OT$)
PAGE:N(4*) | Current page number of report
APPID:C(2*) | Current application ID
APPNAME:C(40*) | Current application name
LNCOUNT:N(3*) | Current line count
PGLINES:N(3*) | Number of lines per page
FIRSTPG:N(1*) | Set to 1 when on page 1, otherwise set to 0
FILESEC:N(1*) | Set to 1 when printing a file section of the report
TABLESEC:N(1*) | Set to 1 when printing a table section of the report

The AUDIT entry point of GLAUDIT.PUB performs the following functions:

- Retrieves templates to use by GL Audit report by calling RMPRAUD.PUB::DIM_VARS
- Determines if GLMAx exists to validate GL accounts from. If the file does not exist, only blank GL accounts are reported back to the audit report
- Retrieves application options to make sure application is enterfaced to GL
- Finds the FILE[ALL] elements that each appliation data file is opened on
- Audits GL Accounts of each data file, checking if it exists in the GLMAx file, as well as the accounts status
- Audits GL Accounts in each table that can contain GL Accounts, checking if it exists in the GLMAx file, as well as the accounts status

The data files that contain GL accounts are: GLALx, GLJRx, GLMAx, and GLREx.

No tables in General Ledger contain GL Accounts.