Translating your program

This section describes separate translation which is the process of converting programs into executable code that the compiler (or assembler) can understand.

Some compilers allow you to use the integrated CICS® translator approach, where the compiler interfaces with CICS at compile time to interpret CICS commands and convert them automatically to calls to CICS service routines. If you use the integrated CICS translator approach many of the translation tasks are done for you. For details of the integrated CICS translator see the CICS Application Programming Guide.

For programs written using the command-level interface, you must use a language translator to interpret the source program for the API. Any external program that contains EXEC CPSM commands must be processed by the appropriate version of the CICS/ESA command level translator.

The following versions of the CICS translator support EXEC CPSM commands:

Notes:
  1. If you are using the CICS/ESA 4.1 version of the translator, make sure the appropriate APAR has been applied before you attempt to translate your program.
  2. If you are using Business Application Services (BAS) to create CICS resource definitions, be sure to use the appropriate version of the translator for the definitions you are creating. That is, if you want to create CICS TS for OS/390 resource definitions, you must use the translator that is distributed with that version of CICS.

Specifying the CPSM translator option

Because CICSPlex® SM uses the CICS/ESA translator, you can use your CICS translate JCL as a model for translating CICSPlex SM API programs. You must specify one additional translator option, called CPSM, in order to translate CICSPlex SM programs. The CPSM option can be specified by using either the PARM operand of the EXEC statement or a language-specific XOPTS options statement.

If your program also contains EXEC CICS commands, those commands are processed in the same translation step. The CICS translator inserts the necessary variable and invocation definitions required for proper execution of the program.

When using the CPSM API in a non-CICS environment, be sure to remove any CICS or SP translator options, and only specify the CPSM translator option.

As a result of the translation process, EXEC CPSM statements are replaced with language specific calls to an EXEC interface stub program.

Sample Assembler translation

To specify the CPSM translator option, use either the PARM operand of the EXEC statement, like this:

  //TRANSLAT EXEC PGM=DFHEAP1$,PARM='CPSM',REGION=4096K

or an XOPTS options statement, like this:

  *ASM XOPTS(...CPSM)

Sample PL/I translation

To specify the CPSM translator option, use either the PARM operand of the EXEC statement, like this:

  //TRANSLAT EXEC PGM=DFHEPP1$,PARM='CPSM',REGION=4096K

or an XOPTS options statement, like this:

  *PROCESS XOPTS(...CPSM)

Sample COBOL translation

To specify the CPSM translator option, use either the PARM operand of the EXEC statement, like this:

  //TRANSLAT EXEC PGM=DFHECP1$,PARM='COBOL3,CPSM',REGION=4096K

or ( for the separate translator) an XOPTS options statement, like this:

  PROCESS XOPTS(...CPSM)

or (for the integrated translator) a CICS compiler option like this:

CICS('opt1 opt2 optn ...')

Note that when you translate a COBOL program, you must specify both the CPSM and the COBOL3 translator options.

Sample C translation

To specify the CPSM translator option, use either the PARM operand of the EXEC statement, like this:

  //TRANSLAT EXEC PGM=DFHEDP1$,PARM='CPSM',REGION=4096K

or an XOPTS options statement, like this:

  #pragma XOPTS(...CPSM)
[[ Contents Previous Page | Next Page Index ]]