MFDAS AWM API [1]

The MFDAS AWM API enables you to call AWM ISPF commands from an Enterprise Developer command prompt. AWM ISPF commands are REXX procedures, CLISTs, or load modules which are written according to the AWM ISPF tool interface definitions. AWM ISPF commands are called through the tool interface REXX procedure TAUZCIF.

Before you can use MFDAS AWM commands, you must connect to an MFA server connection on z/OS. This can be done by using the MFDASMX command. The MFDASMX command requires the connection properties (host name and port) and the user credentials (user ID and password). When the first AWM ISPF command is sent the credentials are requested once again.

An example call of an AWM ISPF command might looks like this:

MFDAS AWM /amslog="c:\temp\awm.log" "TAUZCIF INPARM(SOURCE;%;SMPLTEST;%;T;%;1;%;MFUID;%;BANKDEMO;%;COBOL;%;BBANK10P;%;0102) FORM(REXX) TOOL(TAUENEPR) EXITPARM(TEST) ENV(ONLINE)"

You should ensure that REXX procedures called via MFDAS AWM adheres to the conventions for modeling an ISPF tool. See Attaching ISPF Tools under the ISPF Function Package chapter for more information.

The AWM ISPF command used in the preceding example retrieves all properties of the Endevor element BBANK10P located in the system MFUID and sub system BANKDEMO. In Enterprise Developer you can determine the structure of an AWM ISPF command by executing the command under the corresponding attachment model. Start Enterprise Developer using the -debug option.

In the Eclipse Error Log, the command can be found under the tag:

!MESSAGE Sending TSO Command String:

The output of the AWM ISPF command can be found in the local log file specified with the MFDAS command, c:\temp\awm.log, as specified in the example above.

In this example, the awm.log file will contain the following information:

Input TAUENEPR: SOURCE;%;SMPLTEST;%;T;%;1;%;MFUID;%;BANKDEMO;%;COBOL;%;BBANK10P;%;0102
TAUTOUT: TOOL: TAUENEPR
TAUTOUT: RC: 0
TAUTOUT: INPARM: SOURCE;%;SMPLTEST;%;T;%;1;%;MFUID;%;BANKDEMO;%;COBOL;%;BBANK10P;%;0102
TAUTOUT: DATE: 18/10/10 03:01
TAUTOUT: OUTPARM: ELM2;%;CICS;%;0101;%;0102;%;FB;%;00080;%;cbl;%;T;%;NL;%;ZOS;%;Y;%;
TAUTOUT: ENDPARM:
TAUTOUT: UPDATE: ELM;%;SMPLTEST;%;T;%;1;%;TEST;%;MFUID;%;BANKDEMO;%;COBOL;%;BBANK10P;%;CICS;%;TEST;%;SAMPLECCID2;%;0101;%;0102;%;0
101;%;MFUID;%;MFUID;%;00004;%;00000;%;MFUID;%;20180921 01433098;%;MFUID;%;20181009 03540000;%;CICS;%;FB;%;00080;%;cbl;%;T;%;NL;
%;ZOS;%;Y;%;MFUID.TAUENTMP.OUTSRCM.COBOL(BBANK10P);%; 

The relevant output information can be found after the TAUTOUT: OUTPARM: entry. If the command fails, the output in the log file might look like this:

REXX Procedure TAUENEPX not found
TAUTOUT: TOOL: TAUENEPX
TAUTOUT: RC: 99
TAUTOUT: INPARM: SOURCE;%;SMPLTEST;%;T;%;1;%;MFUID;%;BANKDEMO;%;COBOL;%;BBANK10P;%;0102
TAUTOUT: DATE: 18/10/10 03:05
TAUTOUT: OUTMSG: REXX Procedure TAUENEPX not found

Some AWM ISPF commands return a data set which contains the output data. In this case, the local log file will contain a line like this:

TAUTOUT: OUTPARM: MFUID.TAUCMTMP.VALLIST

You can use the MFDAS IMPORT command to retrieve this data set to your local file system, for example:

MFDAS IMPORT  TEXT "c:\temp\vallist.txt" FROM QSAM 'MFUID.TAUCMTMP.VALLIST'

If the AWM ISPF command is calling a REXX procedure which does not work as expected, it might be helpful to set the REXX trace to obtain more detailed information. The REXX trace can be set by calling the REXX procedure TAUZCDBG, for example:

MFDAS AWM "/amslog=c:\temp\awm.log" "TAUZCDBG TAUENEPR"

When executing the AWM ISPF command TAUENEPR again, the trace of the REXX procedure will be written to the local log file awm.log.