You are here: Development Standards > Routines > General Routines > GENPDLCK.PUB

# GENPDLCK.PUB

GENPDLCK.PUB is a public program that checks for locked periods for a given application or applications.

CHECK_APP:

This entry point will check if a specific appliation is locked for a given period/year.

`1010 CHECK_APP:`
`1020 ENTER FILE[ALL],UPDATEGL$,RMPL$`

Variable | Description
FILE[ALL] | Standard file array
UPDATEGL$ | Template used for period lock checking
RMPL$ | String template for the RMPL file

Exit Points | Explanation
EXIT | This entry point normally exits with no error.

Normal errors will be handled thru ERRORTRAP function, which like most application converion programs, will temporarily hault the conversion process if the user desires so they can break to console mode and attempt to debug the source of the error.

The UPDATEGL$ template has the following format:

Field | Description
APP:C(2*) | Appliation to check
GLPD:N(2*) | GL Period to check
GLYR:N(4*) | GL Year to check
UPDATE_GL:N(1*) | Returns 0 if the GL period is locked, 1 if GL period is not locked.
RMPLCH:N(1*) | Channel RMPLx is opened on. If this is set to 0, GENPDLCK.PUB will open this file.
RET:C(1*) | String of application ID's, GL years, and GL periods that are locked.
MSG:C(1*) | Error message reutnred to calling program if period is locked.

RETURN_ALL:

This entry point will return all application ID's, and each year and period in those applications, that are locked.

`2010 RETURN_ALL:`
`2020 ENTER FILE[ALL],UPDATEGL$,RMPL$`

Variable | Description
FILE[ALL] | Standard file array
UPDATEGL$ | Template used for period lock checking
RMPL$ | String template for the RMPL file

DIM_TEMPLATE:

This entry point will dimension the UPDATEGL$ template.

`3010 DIM_TEMPLATE:`
`3020 ENTER UPDATEGL$`

Variable | Description
UPDATEGL$ | Template used for period lock checking