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

# GLJRNL.PUB

GLJRNL.PUB is a public program that writes General Ledger transactions to the GLJRxxx file. This routine has two entry points: the main entry point for adding records to the GLJRx file, and a separate entry point for reserving a sequence number in the GLJRx file.

(Normal entry point)

This entry point is used when new records are to be written to the GLJRx file. If J0$ is set prior to calling GLJRNL.PUB, the sequence number contained in that variable will always be used when writing a new record. If J0$ is set to "", a new sequence number will be generated and returned thru J0$.

`0090 ENTER F0,J1[ALL],J1$,J2$,J3$,J4$,J5$,J6$,J7$,J8$,J0$,OSSECH,OSSE$`

Variable | Description
F0 | Channel number of the GLJRxxx file
J1[ALL],...,J8$ | GLJRxxx IOList variables (see the General Ledger File Layouts)
J0$ | Sequence number for GLJRxxx file. If set, this sequence number is always used. If empty, a sequence number is generated.
OSSECH | Channel OSSE file is opened on.
OSSE$ | String template for OSSE file.

Exit Points | Explanation
EXIT | GLJRNL.PUB normally exits without an error.
EXIT ERR | An error is returned when an error occurs.

RESERVE_GLJR_ENTRY:

This entry point is used when a sequence number is to be reserved so that it is not used until needed by the calling program. The sequence number is returned to the calling program thru the SEQ$ variable.

`1305 RESERVE_GLJR_ENTRY:`
`1310 ENTER F0,SEQ$,OSSECH,OSSE$`

Variable | Description
F0 | Channel number of the GLJRxxx file
SEQ$ | Sequence number reserved. Returned to calling program.
OSSECH | Channel OSSE file is opened on.
OSSE$ | String template for OSSE file.

Exit Points | Explanation
EXIT | GLJRNL.PUB normally exits without an error.
EXIT ERR | An error is returned when an error occurs.