Sunday, 4 August 2013

Easytrieve Macro Errors: EZTC0175E, EZTC0183W, EZTC0392E

EZTC0175E followed by EZTC0183W usually means Easytrieve found a %MACRO invocation but could not read the requested member. Start with the macro library path: the configured MACDDN must match a JCL DD name, and that DD must point to the library containing the member.

Easytrieve macro error troubleshooting from percent invocation to expanded source
Trace the invocation, macro library lookup, and expanded source before changing program logic.

Easytrieve macro error quick reference

MessageWhat it indicatesFirst check
EZTC0175ESystem error while reading the macro member.Member name, library allocation, MACTYPE, and MACDDN.
EZTC0183WThe macro was not expanded because an earlier error occurred.Read the message immediately before this warning.
EZTC0186EA substitution variable in the macro body is not defined by the prototype.Prototype spelling and the leading ampersand in the body.
EZTC0392EToo few positional parameters were supplied.The numeric count on MACRO n versus the invocation.
B006 MACRO SYSTEM - PDSThe configured PDS macro source could not supply the requested member.The PANDD data set and option-table values for the installed release.

How Easytrieve resolves a macro

A statement such as %PAYLIB tells Easytrieve to retrieve and expand a macro. Broadcom distinguishes this from CALL, which invokes an external subprogram. Macro expansion is part of program generation, so a missing member or bad substitution fails before normal record processing begins.

%PAYLIB

For syntax, positional parameters, keyword parameters, and ampersand substitution, use the separate Easytrieve macros overview. The Easytrieve macro sample program owns the complete worked report example. This page stays focused on library setup and error diagnosis.

Check PANDD, MACDDN, and MACTYPE

For Easytrieve 11.6 macros stored in a PDS, Broadcom instructs users to set MACTYPE to D in EZOPTBL. The MACDDN option names the DD statement Easytrieve searches; PANDD is the documented default in the cited 11.6 guidance.

MACTYPE D
MACDDN  PANDD

The JCL must use the same DD name and point to the data set that contains the macro member:

//PANDD   DD DISP=SHR,DSN=TEAM.EASYTRIEVE.MACROS
//SYSIN   DD DISP=SHR,DSN=TEAM.EASYTRIEVE.SOURCE(MONTHEND)
Do not code a member on PANDD: the macro-library DD should point to the PDS or PDSE, not to TEAM.EASYTRIEVE.MACROS(PAYLIB). The source invocation supplies the member name with %PAYLIB.

Option names and library mechanisms differ across releases and installations. Broadcom's release 6.4 guidance uses MACRO=PDS, while its true 11.6 guidance uses MACTYPE D. Read the active option table instead of assuming an older setting.

Fix EZTC0175E and EZTC0183W

%PAYLIB
EZTC0175E >>> $ system error reading macro member
EZTC0183W >>> + macro not expanded due to above errors

Broadcom ties this pair to macro retrieval. Check the items in this order:

  1. Confirm that the invoked member exists and that its name is spelled correctly.
  2. Confirm that PANDD, or the locally configured DD name, is present in the generation JCL.
  3. Confirm that the DD points to the library, not a single member.
  4. Read MACDDN from the active option table and make sure it matches the JCL.
  5. Confirm that MACTYPE describes the library mechanism used by that release.
  6. Check data set access and the concatenation order if several macro libraries are allocated.

Broadcom identifies JOB06OP2 in the 11.6 CBAAJCL library as the job used with READFILE to list option-table values. Follow site change procedures before rebuilding an option table.

Fix EZTC0392E for positional parameters

The number after MACRO is the required positional-parameter count. A prototype that declares two positional parameters must receive two values:

MACRO 2 FIELD RATE
CALC-AMOUNT = &FIELD * &RATE

This invocation supplies only one value and can produce EZTC0392E:

%CALCPAY GROSS

Supply both values, or change the shared macro only after checking every program that invokes it:

%CALCPAY GROSS TAX-RATE

Broadcom notes that Easytrieve 11.6 New Function Mode can enforce the prototype count where legacy processing might have allowed the mismatch. Updating one caller is normally safer than changing a shared prototype without impact analysis.

Fix EZTC0186E for substitution variables

Broadcom says the leading ampersand belongs on the substitution reference in the macro body, not on the parameter name in the prototype. The names must otherwise match exactly.

MACRO 1 FIELD
DISPLAY &FIELD

If the prototype declares FIELD but the body uses &LENGTH, Easytrieve cannot resolve that variable. Check spelling, parameter type, and whether the reference belongs in the body at all.

Fix B006 MACRO SYSTEM - PDS

Broadcom's release 6.4 article associates B006 with a macro member that cannot be found in the PDS allocated to PANDD. Confirm that the member exists, MACRO=PDS is the intended release-specific setting, and the DD name matches MACDDN.

Do not apply a 6.4 option-table value to 11.6 without checking the installed documentation. The JCL symptom can look similar while the option names differ.

Display expanded macro source

Add LIST ON MACROS before the program statements for a diagnostic generation. Broadcom uses this option to include expanded macro source in the listing:

//SYSIN   DD *
LIST ON MACROS
PARM DEBUG(PMAP DMAP STATE XREF LONG) ABEXIT NO SORT(MSG(ALL))+
LIST FILE COMPILE
//        DD DISP=SHR,DSN=TEAM.EASYTRIEVE.SOURCE(MONTHEND)

The concatenated source-member pattern lets you add diagnostic controls for one run without editing the stored source. Use the exact diagnostic syntax supported by your release. Review the expanded statements around the first error rather than starting with the final warning.

Useful listing rule: fix the first macro error first. Messages such as EZTC0183W often report the consequence of an earlier lookup or substitution failure.

Product macros and application macros

Application macros may reside in a site PDS or PDSE addressed by the configured macro DD. Some Easytrieve or Toolkit macros are delivered in product libraries. A missing product macro can require checking the appropriate product library or load-library concatenation rather than the application PANDD alone.

For example, Broadcom's GETDATEL support note tells users to confirm the Toolkit CAIMAC library and its availability in the required concatenation. Identify who supplies the macro before changing a program or option table.

Macro troubleshooting checklist

  • Copy the first EZTC or macro-system message from the generation listing.
  • Confirm the macro member name and the percent-sign invocation.
  • Identify whether the member is application-owned or product-supplied.
  • Read the active MACTYPE and MACDDN settings.
  • Match the JCL DD name to MACDDN.
  • Point the DD at the library, not an individual member.
  • Compare positional-parameter count and substitution names with the prototype.
  • Use LIST ON MACROS and inspect the expanded source.

Related Easytrieve guides

After the macro expands, use the Easytrieve Library section for FILE and field placement, the field-definition guide for position and type, and the basic reporting guide for REPORT and LINE statements. The Easytrieve JOB statement guide covers the activity that processes the expanded definitions.

Official Broadcom references

Easytrieve macro errors FAQ

What causes Easytrieve error EZTC0175E?

EZTC0175E means Easytrieve could not read the requested macro member. Check the member name, macro library, MACTYPE setting, MACDDN value, and matching JCL DD statement.

What does EZTC0183W mean?

EZTC0183W reports that the macro was not expanded because of an earlier error. Resolve the preceding message, commonly EZTC0175E, rather than treating EZTC0183W as the first failure.

How do you display expanded Easytrieve macro source?

Place LIST ON MACROS at the start of the Easytrieve source or concatenate it ahead of a source member for the diagnostic run. Review the generated listing for the expanded statements.

Does CALL invoke an Easytrieve macro?

No. Invoke a macro with a percent sign, such as %PAYLIB. CALL is used for a subprogram written in another language, such as COBOL or assembler.

When a macro will not expand, compare the active option table, the JCL DD allocation, and the macro prototype before modifying application logic.

No comments:

Post a Comment