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

# ARHITRAN.PUB

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

(Normal entry point)

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

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

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

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

RESERVE_ARHI_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 ARHIx.

`1510 RESERVE_ARHI_SEQ:`
`1530 ENTER F0,SEQ$,OSSECH,OSSE$`

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