0 votes
in VSAM by
Explain the AMS modal command and write its syntax.

1 Answer

0 votes
by

The IDCAMS utility can process more than one AMS command in a single execution. Thus, AMS sets a condition code after every command execution and also a maximum condition code value for each execution. The syntax for the AMS Modal command is given below. Only IDCAMS can be used for this purpose and not the TSO prompt.

Syntax:

IF {LASTCC | MAXCC} {operator} {numeric value}

    THEN {command} |

        DO {command set}   //(such as DEFINE, PRINT, DELETE, etc...)

        END

[ELSE {command} |

        DO

          {command set}

        END]

Here, in the IF statement, the condition code to be tested is specified as either LASTCC or MAXCC.

The LASTCC is the condition code from the last command that was executed (such as delete) just before the IF structure was executed.

A MAXCC is a condition code returned by any of the previous functions.

Operators can be GT or >, LT or <, EQ or = , NE or ¬= (not equal to), GE or >= , LE ro <=.

Related questions

0 votes
0 votes
asked Aug 27, 2022 in VSAM by Robin
0 votes
asked Aug 27, 2022 in VSAM by Robin
0 votes
0 votes
asked Aug 27, 2022 in VSAM by Robin
...