Invoking an IMS Transaction

How to:

To invoke a IMS Transactions 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 the WebFOCUS internal retrieval language.) For information about the Data Manipulation Language, see the Stored Procedures Reference manual.


Top of page

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

where:

synonym

Is the synonym of the IMS Transactions 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 Transaction Using SELECT
SQL
SELECT [parameter [parameter] ... | *] FROM synonym 
[WHERE in-parameter = value]
  .
  .
  .
END

where:

synonym

Is the synonym of the IMS Transactions 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 Transaction Using EX
EX [app_name_space/]syn_name  1=parm1_val,..., N=parmN_val
EX [app_name_space/]syn_name prm1_name=prm1_val,... ,
                             prmN_name=prmN_val
EX [app_name_space/]syn_name [, parm1_val [,...[, parmN_val]]]

where:

app_name_space

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

syn_name

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

parmname

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

1=parm1_val
N=parmN_val
prm1_name
prm1_val
parmN_val

Are the parameter values that match the input metadata description.



Example: Invoking the IMSTRAN Transaction

The following requests produce identical output:

TABLE FILE IMSTPART
PRINT PARTNUM DESCRIPTION PROCCODE INVCODE MAKEDEPT PREVNO MAKETIME 
COMMCODE
IF PARTKEY EQ 'an960c10'
END
 
SQL
SELECT
PARTNUM,DESCRIPTION,PROCCODE,INVCODE,MAKEDEPT,PREVNO,MAKETIME,COMMCODE
FROM IMSTPART
WHERE PARTKEY='an960c10'
END

The output is:

PARTNUM  DESCRIPTION PROCCODE INVCODE MAKEDEPT REVNO MAKETIME COMMCODE
-------  ----------- -------- ------- -------- ----- -------- --------
AN960C10 WASHER      74       2       1        2-00  63       14

The following EX commands invoke the IMSTRAN transaction:

EX IMSTPART 'AN960C10'
EX IMSTPART PARTKEY='AN960C10'
EX IMSTPART 1='AN960C10'

The IMSTPART transaction returns the data associated with PARTKEY 'AN960C10':

FILE=SQLOUT ,SUFFIX=FIX ,$ SEGNAME=SQLOUT ,$ FIELD=FILLER , E2 ,A3 ,A3 , 
,$ FIELD=RECTYPE , E3 ,A1 ,A1 , ,$ FIELD=FILLER , E4 ,A22 ,A22 , ,$ 
FIELD=PARTNUM , E5 ,A12 ,A12 , ,$ FIELD=FILLER , E6 ,A18 ,A18 , ,$ 
FIELD=DESCRIPTION , E7 ,A20 ,A20 , ,$ FIELD=FILLER , E8 ,A26 ,A26 , ,$ 
FIELD=PROCCODE , E9 ,A12 ,A12 , ,$ FIELD=FILLER , E10 ,A18 ,A18 , ,$ 
FIELD=INVCODE , E11 ,A8 ,A8 , ,$ FIELD=FILLER , E12 ,A26 ,A26 , ,$ 
FIELD=MAKEDEPT , E13 ,A12 ,A12 , ,$ FIELD=FILLER , E14 ,A18 ,A18 , ,$ 
FIELD=PREVNO , E15 ,A8 ,A8 , ,$ FIELD=FILLER , E16 ,A26 ,A26 , ,$ 
FIELD=MAKETIME , E17 ,A12 ,A12 , ,$ FIELD=FILLER , E18 ,A18 ,A18 , ,$ 
FIELD=COMMCODE , E19 ,A8 ,A8 , ,$ Part........... AN960C10; 
Desc........... WASHER Proc Code...... 74; Inv Code....... 2 Make 
Dept...... 12-00; Plan Rev Num... Make Time...... 63; Comm Code...... 14

iWay Software