COBOL

In order to work with COBOL masking routines, you need to have the COBOL environment configured:

Building COBOL Masking Routines

To create a COBOL masking routine:

  1. Make a copy of the template masking routine UDCDEMO.CBL.
  2. Update the PROGRAM-ID clause to include the name of your masking routine.
  3. Insert your masking logic within the PROCEDURE DIVISION, after the following comment:
     * 
      * Insert processing logic here. 
    	 *
  4. Update the build script to add instructions for building the new module. For Windows platforms:
    Step Action Details

    1

    Update the build.bat script.

    Add the appropriate COBOL command for generating the source to object code (.obj), for example:

    cobol 
    						   
    						  MYMODULE
    .CBL DEFAULTBYTE"00" CASE:

    Note that routines should be compiled with the DEFAULTBYTE "00" CASE compiler directives.

    Update the setting of the CHANGERS variable to add your masking routine name.

    2

    Update DE_CHANGERS.DEF.

    Add an entry for your masking routine at the end, using a unique value, for example:

    MYMODULE @101

For UNIX platforms, update the build script by adding the appropriate COBOL command for generating the source to object code (.o), for example: cob -xc MYMODULE.CBL -C "DEFAULTBYTE(00) CASE"

Building COBOL Masking Routines

On Windows platforms build your COBOL masking routine by invoking build. On UNIX platforms, build your COBOL masking routine by invoking ./build.