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

# PACJLIB.PUB

PACJLIB.PUB is a public program that handles a variety of Contractors’ Job Cost functions from Payroll and Direct Deposit, via multiple entry points.

WIP_RANGE:

This entry point will read the JOBGL table from the CJTB file and returns the WIP account range.

`1005 WIP_RANGE:`
`1010 ENTER FILE[ALL],WIP1$,WIP2$,CJWIPDF$,CJTB_INDEX`

Variable | Description
FILE[ALL] | Standard file array
WIP1$ | WIP Account from value
WIP2$ | WIP Account thru value
CJWIPDF$ | Default WIP acount
CJTB_INDEX | FILE[x] index that CJTB is opened on

Exit Points | Explanation
EXIT | WIP_RANGE exits with no error.

CHECK_GL_WIP:

This entry point will check the GL Account you entered against the WIP range and let the user know if the data is valid.

`1105 CHECK_GL_WIP:`
`1110 ENTER FILE[ALL],OK$,WIP1$,WIP2$,GL_ACCT$,JOB_ID$,RET$,MSG$`

Variable | Description
FILE[ALL] | Standard File Array
OK$ | Returns “Y” if GL Account is valid, blank if not valid
WIP1$ | WIP account from
WIP2$ | WIP account thru
GL_ACCT$ | GL Account entered by the user to test
JOB_ID$ | Job ID entered by the user
RET$ | Retainage GL account from the APGL table
MSG$ | Returns an error message if GL account entered was not valid

ADD_MAN_TOTAL:

This entry point will accumulate manual check totals into the PABDx file.

`1205 ADD_MAN_TOTAL:`
`1210 ENTER FILE[ALL],PABD_INDEX,CW5$,SCREENPOS,LOC[ALL],CH1$,TMP1[ALL],OSGUI$`

Variable | Description
FILE[ALL] | Standard file array
PABD_INDEX | FILE[x] index that APINx is opened on
CW5$ | Employer paid withholdings flag - 'Y' or 'N'
SCREENPOS | Set to 1 if in the withholdings HLE
LOC[ALL] | Array used in HLE programs
CH1$ | Employee ID entered by the user
TMP1[ALL] | Withholding amounts
OSGUI$ | Standard GUI template

GET_GL_WIP:

This entry point will get the WIP GL account if Job/Phases are using specific WIP codes.

`1305 GET_GL_WIP:`
`1310 ENTER FILE[ALL],GL_ACCT$,JOB_ID$,B11$,CJWC_INDEX`

Variable | Description
FILE[ALL] | Standard File Array
GL_ACCT$ | GL WIP account from the CJWCx file
JOB_ID$ | Job/Phase ID entered by the user
B11$ | WIP information for the Job/Phase ID entered
CJWC_INDEX | FILE[x] index the CJWCx file is opened on

JOB_FROM:

This entry point displays an entry prompt for Job ID from.

`1405 JOB_FROM:`
`1410 ENTER FILE[ALL],LISTYN$,JOB_FROM$,JOB_X0,JOB_X1,JOB_GUI,GUI,OSGUI$,Y$`

Variable | Description
FILE[ALL] | Standard File Array
LISTYN$ | "Y" = Display message 'Enter '*' to input a list of jobs'
JOB_FROM$ | Job ID entered by the user
JOB_X0 | X0 position of the Job From field used by GENINPUT.PUB
JOB_X1 | X1 position of the Job Thru field used by GENINPUT.PUB
JOB_GUI | GUI ID of the Job From prompt used by GENINPUT.PUB
GUI | "1" if in GUI mode
OSGUI$ | Standard GUI template
Y$ | Command returned by GENINPUT.PUB

JOB_THRU:

This entry point displays an entry prompt for Job ID thru.

`1505 JOB_THRU:`
`1510 ENTER FILE[ALL],JOB_FROM$,JOB_X0,JOB_X1,JOB_GUI,JOB_THRU$,GUI,OSGUI$,Y$`

Variable | Description
FILE[ALL] | Standard File Array
JOB_FROM$ | Job ID entered previously by the user
JOB_X0 | X0 position of the Job From field used by GENINPUT.PUB
JOB_X1 | X1 position of the Job Thru field used by GENINPUT.PUB
JOB_GUI | GUI ID of the Job From prompt used by GENINPUT.PUB
JOB_THRU$ | Job ID entered by the user
GUI | "1" if in GUI mode
OSGUI$ | Standard GUI template
Y$ | Command returned by GENINPUT.PUB

SKILL:

This entry point will prompt for a Skill Level.

`1605 SKILL:`
`1610 ENTER FILE[ALL],PACL_INDEX,CL5[ALL],CE6$,CL1$,CL2$,SKILL$,SAVE_SKILL$,SK$,CE8$,SKILL_X0,SKILL_X1,SKILL_GUI,GUI,OSGUI$,Y$`

Variable | Description
FILE[ALL] | Standard File Array
PACL_INDEX | FILE[x] element that PACLx is open on
CL5[ALL] | Pay rate skills
CE6$ | Labor Class
CL1$ | Class Code
CL2$ | Class Description
SKILL$ | List of skills
SAVE_SKILL$ | Original skill level entered by the user
SK$ | Skill level entered by the user
CE8$ | Employee and record type
SKILL_X0 | X0 position of the Skill Level prompt for GENINPUT
SKILL_X1 | X1 position of the Skill Level prompt for GENINPUT
SKILL_GUI | GUI ID of the Skill Level prompt for GENINPUT
GUI | "1" if in GUI mode
OSGUI$ | Standard GUI template
Y$ | Command returned by GENINPUT.PUB

UNION:

This entry point will paint and prompt for a Union Code.

`1705 UNION:`
`1710 ENTER FILE[ALL],UNION_X0,UNION_X1,UNION_GUI,CE8$,PAUN_INDEX,Y$,GUI,OSGUI`

Variable | Description
FILE[ALL] | Standard File Array
UNION_X0 | X0 position of the Union prompt for GENINPUT
UNION_X1 | X1 position of the Union prompt for GENINPUT
UNION_GUI | GUI ID of the Union prompt for GENINPUT
CE8$ | Employee and Record Type
PAUN_INDEX | FILE[x] element that PAUNx is open on
Y$ | Command returned by GENINPUT.PUB
GUI | "1" if in GUI mode
OSGUI$ | Standard GUI template

WORK_COMP:

This entry point will read the APGL table and return the retainage account.

`1805 WORK_COMP:`
`1810 ENTER ENTER FILE[ALL],PAWC_INDEX,B8$,CE8$,EG5$,WORK_X0,WORK_X1,WORK_GUI,Y$,GUI,OSGUI$`

Variable | Description
FILE[ALL] | Standard File Array
PAWC_INDEX | FILE[x] element that PAWCx is opened on
B8$ | Payroll information from JOBSx file
CE8$ | Job/Phase ID
EG5$ | Employee default Workers' Compensation code
WORK_X0 | X0 position of the Workers' Comp. Code prompt for GENINPUT
WORK_X1 | X1 position of the Workers' Comp. Code prompt for GENINPUT
Y$ | Command returned by GENINPUT.PUB
GUI | "1" if in GUI mode
OSGUI$ | Standard GUI template

UPDATE_JOB_TYPE:

This entry point will update the B5[ALL] cost types array with the correct amount

`2105 UPDATE_JOB_TYPE:`
`2110 ENTER FILE[ALL],JOB_ID$,AMOUNT,B2[ALL],B5[ALL],SPREC`

Variable | Description
FILE[ALL] | Standard File Array
JOB_ID$ | Job/Phase/Cost Code entered by the user
AMOUNT | Extended amount of the line item
B2[ALL] | Array from JOBSx record containing overhead amount
B5[ALL] | Array from JOBSx record containing cost type amounts
SPREC | Precision for multiplication

PREPARE_CHECKS:

This entry point will update the various Payroll CJ special files with check information. We will pass in all variables at the current point of the call.

`3005 PREPARE_CHECKS:`
`3010 ENTER`

CLEAR_FILES:

This entry point will remove all entries from specific files that are related to the current check run. This routine is called at the end of the Post Checks function.

`5000 CLEAR_FILES:`
`5010 ENTER FILE[ALL],PAWW,PAWW$,PABD,PABD$,PAUW,PAUW$,PAHP,PAEG,A4$,OSGUI$`

Variable | Description
FILE[ALL] | Standard File Array
PAWW | FILE[x] index the PAWWx file is opened on
PAWW$ | Path and file name for the current PAWWx file to initialize
PABD | FILE[x] index the PABDx file is opened on
PABD$ | Path and file name for the current PABDx file to initialize
PAUW | FILE[x] index the PAUW file is opened on
PAUW$ | Path and file name for the current PAUW file to initialize
PAHP | FILE[x] index the PAHPx file is opened on
PAEG | FILE[x] index the PAEGx file is opened on
A4$ | The list of group codes being processed in the current check run
OSGUI$ | Standard GUI template

GETRATES:

This entry point returns the correct pay rate based on labor class and skill level.

`5805 GETRATES:`
`5810 ENTER FILE[ALL],PAJC_INDEX,PACL_INDEX,PAEC_INDEX,RT1,CLASS$,CE6$,CE4$,SK$,CE1[ALL],RATE,EG2[ALL],CL1$,CL2$,CL3$,CL4$,CL5[ALL],CL6[ALL],CL99$[ALL],CL99[ALL],OSGUI$`

Variable | Description
FILE[ALL] | Standard File Array
PAJC_INDEX | FILE[x] index the PAJCx file is opened on
PACL_INDEX | FILE[x] index the PACLx file is opened on
PAEC_INDEX | FILE[x] index the PAECx file is opened on
RT1 | Rate from PAJCx file
CLASS$ | Class entered by the user
CE6$ | Labor Code
CE4$ | Job/Phase ID
SK$ | Skill level entered by the user
CE1[ALL] | Store rate
RATE | Returns the rate calculated
EG2[ALL] | Default employee rate information
CL1$ | Class Code
CL2$ | Class Description
CL3$ | Skill Level IDs
CL4$ | Skill Level descriptions
CL5[ALL] | Skill level pay rate
CL6[ALL] | Reserved for OSD
CL99$[ALL] | Reserved for OSD
CL99[ALL] | Reserved for OSD
OSGUI$ | Standard GUI template