Arrays Used in Batch Processing (Technical)
In Global Payroll batch processing, arrays are used to store data. Arrays are temporary tables that COBOL programs use to store data during processing. Once processing is complete, the programs write the data from the temporary arrays to the appropriate output tables.
Occasionally you might need to modify the COBOL programs to accommodate a larger maximum array size than is defined in the programs that are delivered by PeopleSoft. If an array is too small (the data overflows the array), you get an error message, and the batch process fails. The error message (MSGID-ARRAY-OFLOW) identifies the array and the COBOL file where the array is defined. This guides you to the location in the designated file that might need modification.
Increasing the Occurs Count in Arrays
The table access programs allocate a specified, limited amount of memory space to store in a table array all the details of the payroll process tables that are typical for a payroll run.
You can increase the maximum size of an array by increasing the occurs count in the appropriate table access program.
Note:
This is the only COBOL modification that we detail because COBOL modifications to the delivered Global Payroll programs are strongly discouraged.
For example, let's look at a piece of unmodified code in GPCDPDM.CBL.
Below is an array and its related COUNT control field that prevents the program from aborting. When you make a modification, both highlighted numbers must be changed and kept in sync.
05 L-PMT-COUNT PIC 9999 VALUE 0 COMP.
88 L-PMT-COUNT-MAX VALUE 200.
05 L-PMT-DATA OCCURS 200
INDEXED BY PMT-IDX.
The assumption here is that there will never be more than 200 payments processed for a payee during any calendar run. If more than 200 payments were processed, the program would issue an error message (MSGID-ARRAY-OFLOW), and the payroll process would terminate.
While the system loads and refreshes this array once for each payee, the system refreshes other arrays for each payment, and loads and increments others throughout the entire process.
This type of modification is not difficult to deal with when you upgrade to a new Global Payroll release, when PeopleSoft delivers a whole new set of source code. Simply move your array size modifications to the new code line. Whenever you change the size of an array, be sure to recompile the entire Global Payroll COBOL code line (GPP*).