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

# APHITRAN.PUB

APHITRAN.PUB is a public program that handles writing records to the Accounts Payable detail history file. This interface is called from routines that need to write new records to APHIx.

(Normal entry point)

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

`0099 ENTER F0,OSSECH,OSSE$,H5$,H0$,H1$,H2$,H0,H1,H2,H3,H3$,H4$,H4,H5,H6,H7,H8,H9[ALL],H6$,H7$,H99$[ALL],H99[ALL]`

Variable | Description
F0 | Channel APHIx file is opened on
OSSECH | Channel OSSE file is opened on.
OSSE$ | String template for OSSE file.
H5$ | If set prior to calling APHITRAN.PUB, that sequence will always be used when writing a new record to APHIx. If set to ““, the sequence number generated will be returned to the calling program
H1$,H2$,..H99[ALL] | APHIxxx IOList variables (see the Accounts Payable File Layouts)

Exit Points | Explanation
EXIT | APHITRAN.PUB normally exits with no error.
EXIT ERR | An error is returned when an error occurs.

RESERVE_APHI_SEQ:

This entry point is used when a sequence number is to be reserved so that it’s not used until needed by the calling program. The sequence number is returned to the calling program thru the SEQ$ variable. The next available number is then written back to the NXTSEQ record in APHIx.

`3010 RESERVE_APHI_SEQ:`
`3015 ENTER F0,SEQ$,OSSECH,OSSE$`

Variable | Description
F0 | Channel APHIx file is opened on
SEQ$ | Next available sequence number in APHIx
OSSECH | Channel OSSE file is opened on.
OSSE$ | String template for OSSE file.