GL BUFFER EXAMPLE 02

The problem we need to solve:

We can do this simply by replacing an existing single variable with GL Buffer as the IDIF variable defined. The earlier in the record structure you can do your bypassing logic, the sooner the UPGLF program can move on to the next record, if necessary.

For purposes of this example, we will presume that the first variable on the file would be PERSON CODE (in the GL Buffer as positions 119 for 16 characters).

If we change the IDIF to use GL BUFFER as the Variable rather than PERSON_CODE, we can then use the following derivation expression:

CASE WHEN (substr(~,61,5) = '11101') then 'BYPASS'
     WHEN (substr(~,61,5) = '28805') then 'BYPASS'
     WHEN (substr(~,61,5) = '28806') then 'BYPASS'
     WHEN (substr(~,51,15) = '100-00000-00000') then 'BYPASS'
     ELSE trim(substr(~,119,16))
END