easytrieve MACROS



Unicenter CA-Easytrieve Plus Report Generator: CA's information retrieval and data management tool

easytrieve MACROS

Postby kamal » Wed Jun 25, 2008 9:46 pm

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?
kamal
 
Posts: 48
Joined: Wed Aug 22, 2007 2:49 pm
Has thanked: 0 time
Been thanked: 0 time

Re: easytrieve MACROS

 

Re: easytrieve MACROS

Postby dick scherrer » Wed Jun 25, 2008 11:31 pm

Hello,

The first statement in an easytrieve macro should be MACRO. . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6269
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: easytrieve MACROS

Postby kamal » Thu Jun 26, 2008 10:26 am

yeah,made the change..
but anything to be added/changed in JOB? The error continues...
''*******B006 MACRO SYSTEM - PDS , ERROR IN MACRO FILE'.
kamal
 
Posts: 48
Joined: Wed Aug 22, 2007 2:49 pm
Has thanked: 0 time
Been thanked: 0 time

Re: easytrieve MACROS

Postby dick scherrer » Thu Jun 26, 2008 10:43 am

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.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6269
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: easytrieve MACROS

Postby kamal » Fri Jun 27, 2008 11:59 am

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.
kamal
 
Posts: 48
Joined: Wed Aug 22, 2007 2:49 pm
Has thanked: 0 time
Been thanked: 0 time

Re: easytrieve MACROS

Postby dick scherrer » Fri Jun 27, 2008 12:11 pm

You're welcome :)

d
User avatar
dick scherrer
Global moderator
 
Posts: 6269
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: easytrieve MACROS

Postby kamal » Mon Jul 07, 2008 2:28 pm

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?
kamal
 
Posts: 48
Joined: Wed Aug 22, 2007 2:49 pm
Has thanked: 0 time
Been thanked: 0 time

Re: easytrieve MACROS

Postby dick scherrer » Mon Jul 07, 2008 10:01 pm

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.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6269
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: easytrieve MACROS

Postby kamal » Tue Jul 08, 2008 11:56 am

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.
kamal
 
Posts: 48
Joined: Wed Aug 22, 2007 2:49 pm
Has thanked: 0 time
Been thanked: 0 time

Re: easytrieve MACROS

Postby dick scherrer » Tue Jul 08, 2008 12:36 pm

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.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6269
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Next

Return to CA-Easytrieve

 


  • Related topics
    Replies
    Views
    Last post