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

# PAYEARS.PUB

PAYEARS.PUB is a public program that builds a scratch file with active Payroll years running in OSAS. This interface is called from both the PASETUP.PUB function (F9 from the menu), which allows users to switch to prior year files, and from Change Fields, allowing users to change Payroll key fields across multiple years of Payroll files.

(Normal entry point)

This entry point is used to build an m-keyed file that contains a list of Payroll years. This is done by looking for the existance of the MASK$ field in file names when searching thru the current dataset.

`0100 ENTER F$,F0,MASK$,FILE[ALL]`

Variable | Description
F$ | Name of m-keyed file built that contains GL years
F0 | Channel F$ file is opened on
MASK$ | Mask field to use to search thru dataset (ex: "PAEGH.Y??", "PAEGH.Y*". ? = Any single character * = Any number of characters
FILE[ALL] | Standard file array

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

CUSTOM_SCRATCH_FILE:

This entry point is used identically to how the normal entry point is used, with the exception that the scratch file built will contain 2 fields per record: the PA year and the word “NO “. This is used by the Change Fields function to build a list of years available for changing fields for.

`0130 CUSTOM_SCRATCH_FILE:`
`0140 ENTER F$,F0,MASK$,FILE[ALL]`

Variable | Description
F$ | Name of m-keyed file built that contains GL years
F0 | Channel F$ file is opened on
MASK$ | Mask field to use to search thru dataset (ex: "PAEGH.Y??", "PAEGH.Y*". ? = Any single character * = Any number of characters
FILE[ALL] | Standard file array

Exit Points | Explanation
EXIT | PAYEARS.PUB normally exits with no error.