Page 1 of 2

easytrieve MACROS

PostPosted: Wed Jun 25, 2008 9:46 pm
by kamal
This is a sample program using EZT MACRO.
I know few things in EZT but don't know how to use EZT macros.

//JOB ...
//STEP1 EXEC PGM=EZTPA00                                             
//EZTVFM   DD UNIT=SYSDA,SPACE=(CYL,(100,100),RLSE)                     
//PERSNL1  DD *                                                         
0001  NAME1                                                             
0002  NAME2                                                             
0003  NAME3                                                             
0004  NAME4                                                             
/*                                                                     
//PERSNL2  DD *                                                         
0001  24                                                               
0002  25                                                               
0003  26                                                               
0004  27                                                               
/*                                                                     
//PRTFL01  DD SYSOUT=*                                                 
//*                                                                     
//SYSPRINT DD SYSOUT=*                                                 
//SYSOUT   DD SYSOUT=*                                                 
//SYSABEND DD SYSOUT=*                                                 
//*                                                                     
//SYSIN    DD *                                                         
*---------------------------------------------------------------*       
PARM DEBUG(FLOW FLOWSIZ   300  STATE FLDCHK NOXREF DMAP CLIST)         
LIST ON                                                                 
*******************************************************************     
FILE PRTFL01 PRINTER FB(133 0)                                         
*******************************************************************     
FILE PERSNL1 FB(40 400)                                                 
%PERSNL                                                                 
*                                                                       
FILE PERSNL2 FB(40 400)                                                 
IN2-KEY    01  04  A  HEADING('EMPLOYEE' 'NUMBER')                     
IN2-AGE    07  02  N  HEADING('EMPLOYEE' 'AGE')                         
*                                                                       
 JOB INPUT (PERSNL1 KEY(IN1-KEY) PERSNL2 KEY(IN2-KEY))                 
 PRINT PAY-RPT                                                         
 REPORT PAY-RPT LINESIZE 132 PRINTER PRTFL01 NOADJUST NOPAGE NODATE   
 TITLE 1 'IF MATCH KEY REPORT - TWO FILES COMPARISON '                 
 LINE 01 IN1-KEY IN1-NAME IN2-AGE                                     
/*                                   


I created a member with name PERSNL (as MACRO name is %PERSNL ) in the same PDS where above JCL resides.
The contents of PERSNL member are

IN1-KEY    01  04  A  HEADING('EMPLOYEE' 'NUMBER')     
IN1-NAME   07  10  A  HEADING('EMPLOYEE' 'NAME')       



Obv. Job failed with msg '*******B006 MACRO SYSTEM - PDS , ERROR IN MACRO FILE'.
What should be added/changed in/from the JCL so that MACRO PERSNL can be used?

Re: easytrieve MACROS

PostPosted: Wed Jun 25, 2008 11:31 pm
by dick scherrer
Hello,

The first statement in an easytrieve macro should be MACRO. . .

Re: easytrieve MACROS

PostPosted: Thu Jun 26, 2008 10:26 am
by kamal
yeah,made the change..
but anything to be added/changed in JOB? The error continues...
''*******B006 MACRO SYSTEM - PDS , ERROR IN MACRO FILE'.

Re: easytrieve MACROS

PostPosted: Thu Jun 26, 2008 10:43 am
by dick scherrer
Hello,

You also need to name the dataset containing the macro(s)in the jcl.

You may need to talk with your tech support people to learn the ddname - it varies from site to site. You could try a ddname of PANDD or PANDD1 - i've seen these at several insallations.

Re: easytrieve MACROS

PostPosted: Fri Jun 27, 2008 11:59 am
by kamal
You may need to talk with your tech support people to learn the ddname - it varies from site to site. You could try a ddname of PANDD or PANDD1 - i've seen these at several insallations.


exactly dick scherrer!...PANDD was missing...found on some document and it worked!!
Thanks for your Inputs and time.

Re: easytrieve MACROS

PostPosted: Fri Jun 27, 2008 12:11 pm
by dick scherrer
You're welcome :)

d

Re: easytrieve MACROS

PostPosted: Mon Jul 07, 2008 2:28 pm
by kamal
How can I define MACROs in VSAM file.What changes are required in JCL?
Take same example shown above:
IN1-KEY    01  04  A  HEADING('EMPLOYEE' 'NUMBER')     
IN1-NAME   07  10  A  HEADING('EMPLOYEE' 'NAME')       

How to put this code in VSAM file ...What should be the structure,type,key of VSAM file?
What should be done to let JCL know that MAcro is in VSAM file (~ PANDD)?

Does anybody have any exmaple explaining use of Macros defined in VSAM file?

Re: easytrieve MACROS

PostPosted: Mon Jul 07, 2008 10:01 pm
by dick scherrer
Hello,

How can I define MACROs in VSAM file.What changes are required in JCL?
Macros are not defined in vsam files - they are defined as ezt source.

If you clarify what you want to do/know, someone may be able to help.

Re: easytrieve MACROS

PostPosted: Tue Jul 08, 2008 11:56 am
by kamal
Am referring to User Guide 6.3
Storing Macros
Macro statements are stored and maintained in a macro library. The MACRO
entry in the CA-Easytrieve Plus options table (see the “Option Tables” appendix
of the CA-Easytrieve Plus Reference Guide) specifies the macro library storage
access method. The types of access methods are:
Term Description
PAN Macros stored in a CA-Panvalet library and maintained through
CA-Panvalet utilities.
PDS (OS/390 only) Macros stored in a partitioned data set.
SSL (VSE only) Macros stored in a VSE Source Statement Library. SSLs are
maintained by using a variety of VSE utilities.
USER Any user-supplied library facility that you can use for the macro library.
VSAM A specially formatted VSAM data set that you can use as the macro
library. Macros are maintained using a special CA-Easytrieve Plus
program.
END OF SECOND READING
Please turn to the “Programming Techniques” chapter.


VSAM A specially formatted VSAM data set that you can use as the macro
library. Macros are maintained using a special CA-Easytrieve Plus
program.

Re: easytrieve MACROS

PostPosted: Tue Jul 08, 2008 12:36 pm
by dick scherrer
Hello,

You already have a macro library - is your PANDD not a pds?. You do not need another.

Also, FWIW, ezt release 6.3 is no longer a supported product.