Handling High Job Numbers

Starting with Enterprise Developer version 3.0, job numbers in excess of 99999 are supported.

Printer exit job numbers are handled by the spool.cpy copybook, stored in the %ProgramFiles(x86)%\Micro Focus\Enterprise Developer\cpylib (Windows) or /opt/microfocus/EnterpriseDeveloper/cpylib (UNIX) directory by default.

Job numbers up to 99999 are placed in the ()-job-number field.

Job numbers in excess of this value use the ()-job-number-compx field.

To detect which field to use when reporting the job number, test if the value of ()-job-number is numeric or not. If it is numeric, move the contents of ()-job-number to ()-job-nbr-disp. If it is not numeric, move the contents of ()-job-number-compx to ()-job-nbr-disp.

An example of this is included in the print-processor section of the sampprnx.cbl sample printer exit as follows:

      *5 or 7 digit job number? 
           if lk-job-number is numeric 
               move lk-job-number to ws-job-nbr-disp 
           else 
               move lk-job-number-compx to ws-job-nbr-disp 
           end-if 
 
           move 1          to ws-srv-cmsg-size 
           string 
             " EXIT - Printer Printing for job number: " 
                               delimited by size 
             ws-job-nbr-disp   delimited by size 
           into txt-buffer with pointer ws-srv-cmsg-size