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

# INHCTRAN.PUB

INHCTRAN.PUB is a public program that handles writing records to the Inventory GL adjustments history file. This interface is called from routines that need to write new records to INHCx.

(Normal entry point)

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

`0099 ENTER F0,OSSECH,OSSE$,INHC$`

Variable | Description
F0 | Channel INHCx file is opened on
OSSECH | Channel OSSE file is opened on.
OSSE$ | String template for OSSE file.
INHC$ | INHCx string template (see the Inventory File Layouts)

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

RESERVE_INHC_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 INHC.SEQ$ variable. The next available number is then written back to the NXTSEQ record in INHCx.

`3010 RESERVE_INHC_SEQ:`
`3020 ENTER F0,INHC$,OSSECH,OSSE$`

Variable | Description
F0 | Channel INHCx file is opened on
SEQ$ | INHCx string template (see the Inventory File Layouts)
OSSECH | Channel OSSE file is opened on.
OSSE$ | String template for OSSE file.