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

# CJHITRAN.PUB

ARHITRAN.PUB is a public program that handles writing records to the Contractors' Job Cost detail history file. This interface is called from routines that need to write new records to CJHIx.

(Normal entry point)

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

`0099 ENTER F0,OSSECH,OSSE$,JH0$,JH1$,JHT$,JH2$,JH3$,JH4$,JH4[ALL],JH5$,JH5,JH6,JH99$[ALL],JH99[ALL]`

Variable | Description
F0 | Channel CJHIx file is opened on
OSSECH | Channel OSSE file is opened on.
OSSE$ | String template for OSSE file.
H0$ | If set prior to calling CJHITRAN.PUB, that sequence will always be used when writing a new record to CJHIx. If set to "", the sequence number generated will be returned to the calling program
JH1$,..JH99[ALL] | CJHIxxx IOList variables (see the Contractors' Job Cost File Layouts)

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

RESERVE_CJHI_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.

`3010 RESERVE_CJHI_SEQ:`
`3020 ENTER F0,SEQ$,OSSECH,OSSE$`

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