Invoking a CICS Transaction

How to:

To invoke a CICS transaction, you issue a Data Manipulation Language (DML) request, also known as a TABLE command, an SQL SELECT statement, or an EX command. (DML is Information Builders internal retrieval language.) For information about the Data Manipulation Language, see the Stored Procedure Reference manual.


Top of page

x
Syntax: How to Invoke a CICS Transaction Using TABLE
TABLE FILE synonym 
PRINT [parameter [parameter] ... | *]
[IF in-parameter EQ value]
  .
  .
  .
END

where:

synonym

Is the synonym of the CICS transaction you want to invoke.

parameter

Is the name of a parameter whose values you want to display. You can specify input parameters, output parameters, or input and output parameters.

If the transaction does not require parameters, enter an * in the syntax. This displays a dummy segment, created during metadata generation, to satisfy the structure of the SELECT statement.

*

Indicates that you want to display all indicated parameters.

IF/WHERE

Is used if you want to pass values to input parameters.

in-parameter

Is the name of an input parameter to which you want to pass a value.

value

Is the value you are passing to an input parameter.


Top of page

x
Syntax: How to Invoke a CICS Transaction Using SELECT
SQL
SELECT [parameter [,parameter] ... | *] FROM synonym 
[WHERE in-parameter = value]
  .
  .
  .
END

where:

synonym

Is the synonym of the CICS transaction you want to invoke.

parameter

Is the name of a parameter whose values you want to display. You can specify input parameters, output parameters, or input and output parameters.

If the transaction does not require parameters, enter an * in the syntax. This displays a dummy segment, created during metadata generation, to satisfy the structure of the SELECT statement.

*

Indicates that you want to display all indicated parameters.

WHERE

Is used if you want to pass values to input parameters.

You must specify the value of each parameter on a separate line.

in-parameter

Is the name of an input parameter to which you want to pass a value.

value

Is the value you are passing to an input parameter.


Top of page

x
Syntax: How to Invoke a CICS Transaction Using EX
EX [app_name_space/]synonym  1=parm1_val,..., N=parmN_val 
EX [app_name_space/]synonym parm1_name=parm1_val,... , 
                            parmN_name=parmN_val
EX [app_name_space/]synonym [, parm1_val [,...[, parmN_val]]]

where:

app_name_space

Is the apps directory name under which the synonyms are stored. This value is optional.

synonym

Is the user friendly name of a repository entry that represents the object to be executed in the vendor environment.

parm_name

Is the name of the parameter taken from the input metadata description.

1=parm1_val
N=parmN_val
parm1_name
parm1_val
parmN_val

Are the parameter values that match the input metadata description.

Note:



Example: Invoking the ETPBRW8 Transaction

The following TABLE command invokes the ETPBRW8 transaction, passing one parameter value to it.

TABLE FILE ETPBRW8
  PRINT SEG11.NUMB SEG11.STAT SEG11.NAME SEG11.ADDRX SEG11.PHONE
  IF SEG1.NUMB EQ '000700'
END

The output is:

NUMBER OF RECORDS IN TABLE=        4  LINES=      4
 
 
PAGE     1
 
 
NUMB    STAT  NAME                  ADDRX                 PHONE
----    ----  ----                  -----                 -----
000762        SUSAN MALAIKA         SAN JOSE,CALIFORNIA   22312121
000983        J. S. TILLING         WASHINGTON, DC        34512120
001222        D.J.VOWLES            BOBLINGEN, GERMANY    70315551
001781        TINA J YOUNG          SINDELFINGEN,GERMANY  70319990

The following SELECT command invokes the ETPBRW8 transaction:

SQL
SELECT  SEG11.NUMB, SEG11.STAT, SEG11.NAME, SEG11.ADDRX, SEG11.PHONE
FROM ETPBRW8
WHERE SEG1.NUMB = '000700';
END

The output is:

PAGE     1
 
NUMBER OF RECORDS IN TABLE=        4  LINES=      4
 
NUMB    STAT  NAME                  ADDRX                 PHONE
----    ----  ----                  -----                 -----
000762        SUSAN MALAIKA         SAN JOSE,CALIFORNIA   22312121
000983        J. S. TILLING         WASHINGTON, DC        34512120
001222        D.J.VOWLES            BOBLINGEN, GERMANY    70315551
001781        TINA J YOUNG          SINDELFINGEN,GERMANY  70319990

The following EX commands invoke the ETPBRW8 transaction:

EX ETPBRW8 '000700'
 
EX ETPBRW8 NUMB='000700'
 
EX ETPBRW8 1='000700'

The ETPBRW8 transaction browses the file starting from '000700' and, in these examples, returns values greater than '000700'.

Note: In order to use the EX command, you must set the SET EXORDER setting in either the FOCEXEC or in edasprof.prf.

SET EXORDER=PGM/FEX
 
EX baseapp/etpbrw8 NUMB='000700'

The output is:

FILE=SQLOUT,SUFFIX=FIX,$
  SEGNAME=SQLOUT,$
    FIELD=STAT,    E11       ,A1       ,A1       ,         ,$
    FIELD=NUMB,    E12       ,A6       ,A6       ,         ,$
    FIELD=NAME,    E13       ,A20      ,A20      ,         ,$
    FIELD=ADDRX,   E14       ,A20      ,A20      ,         ,$
    FIELD=PHONE,   E15       ,A8       ,A8       ,         ,$
    FIELD=DATEX,   E16       ,A8       ,A8       ,         ,$
    FIELD=AMOUNT,  E17       ,A8       ,A8       ,         ,$
    FIELD=COMMENT, E18       ,A9       ,A9       ,         ,$
 
000762SUSAN MALAIKA       SAN JOSE,CALIFORNIA 2231212101 06 
74$0000.00*********
 
000983J. S. TILLING       WASHINGTON, DC      3451212021 04 
75$9999.99*********
 
001222D.J.VOWLES          BOBLINGEN, GERMANY  7031555110 04 
73$3349.99*********
 
001781TINA J YOUNG        SINDELFINGEN,GERMANY7031999021 06 
77$0009.99*********

WebFOCUS