You are here: Development Standards > Routines > General Routines > GENBATCH.PUB

# GENBATCH.PUB

GENBATCH.PUB is a public program that prompts for batches where necessary in Accounts Payable, Accounts Receivable, Purchase Order, and Sales Order. There are four separate entry point that are available for use depending on how you need to work with batches.

BATCHES

This entry point prompts for batches to be tagged in preparation for printing reports and posting batches.

`0055 BATCHES:`
`0060 ENTER FILE[ALL],BATCH_TMPL$,BATCH$,COUNT,Y$,PARAM,OSGUI$,O2$`

``

Variable | Description
FILE[ALL] | Standard file array
BATCH_TMPL$ | Template containing information for batch entry
BATCH$ | String of batches that are selected by the user
COUNT | Total number of batches selected
Y$ | Standard command string
PARAM | Variable used in restart logic for restart testing
OSGUI$ | GUI template (see GENGURES.PUB)
O2$ | Application options of calling application

Exit Points | Explanation
EXIT | GENBATCH.PUB does not return any errors.

This chart breaks down the BATCH_TMPL$ template:

Field | Description
JRNL1:C(7) | Report printing status, column 1 title; may be blank
JRNL2:C(7) | Report printing status, column 2 title; may be blank
JRNL3:C(7) | Report printing status, column 3 title; may be blank
APPL:C(2) | Calling application ID
FILE:N(2) | FILE[x] array element on which xxBTx file is opened
FLAG_RPT:C(1) | Flag to set reports to when printed
POST:N(1) | Set when using transaction posts

SET_TEMPLATE

This entry point sets up the template BATCH_TMPL$.

`10005 SET_TEMPLATE:`
`10010 ENTER BATCH_TMPL$`

NO_BATCHES

This entry point is used when the calling application is not using batching as an option for transaction entry. This updates the blank batch record’s report statuses and lock flags as necessary.

`12002 SET_TEMPLATE:`
`12005 ENTER FILE[ALL],BATCH_TMPL$,BATCH$,COUNT,Y$,PARAM,OK,O2$,OSGUI$`

UNFLAG_BATCHES

This entry point resets the lock flag on the batches that were initially locked by GENBATCH.PUB. Those batches are contained in the BATCH$ string.

`13005 UNFLAG_BATCHES:`
`13010 ENTER FILE[ALL],BATCH_TMPL$,BATCH$`

UNFLAG_ALL_BATCHES

This entry point resets the lock flag on all batches that are currently in the batch file.

`14005 UNFLAG_ALL_BATCHES:`
`14010 ENTER FILE[ALL],BATCH_TMPL$`