“Add” Interface Procedure

  logical procedure qedit'useradd     (string,len,userspace,procspace);     byte array string;     integer len;     array userspace,procspace;     option external;  

This procedure is activated by the “Add” parameter of the Interface command.

The “Add” procedure allows you to examine (and modify) each line that the user Adds into the workfile (only basic Add, not copy, move or join from file).

Parameters of “Add”

STRING is a byte array containing the characters of a workfile line entered by the user. Maximum length is determined by the current language setting (JOB=80, SPL=72, FTN=72, COB=66, COBX=74, RPG=80, PASC=72, TEXT<=256). Any TABs and shift operations have been performed.

LEN is the number of characters in the line. If the user procedure adjusts the length of the line, this variable must also be adjusted. If the user procedure extends the length beyond the current language limit, Qedit truncates the line. In no case can it exceed 1,000 characters (Qedit abort #111). The user procedure is allowed to use two bytes beyond LEN for internal purposes (such as a terminating character).

USERSPACE and PROCSPACE: same as above (Init).

Return value: FALSE causes the line to be rejected; TRUE causes it to be Added to the workfile.

"Add" Interface Procedure