IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Getting error when trying to use Macros in Easytrieve.


IBM Mainframe Forums -> CA Products
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Delip

New User


Joined: 13 Sep 2007
Posts: 46
Location: Bangalore

PostPosted: Tue Nov 13, 2007 11:49 pm
Reply with quote

We are trying to use instream macros in Easytrieve by using MSTART.But it is not recognising MSTART and throwing an error 'undefined name MSTART'. Any idea?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Nov 14, 2007 12:55 am
Reply with quote

Hello,

If you post the code you are trying to use (and the diagnostic info provided), we will be better able to help.
Back to top
View user's profile Send private message
Delip

New User


Joined: 13 Sep 2007
Posts: 46
Location: Bangalore

PostPosted: Wed Nov 14, 2007 2:29 am
Reply with quote

Hi,

I am attaching the jcl code containing easytrieve code, macro and the compile listing of the error code.************Use PM.....
Thank you,
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Wed Nov 14, 2007 2:44 am
Reply with quote

Is the LIST OFF hiding any messages?
Back to top
View user's profile Send private message
Delip

New User


Joined: 13 Sep 2007
Posts: 46
Location: Bangalore

PostPosted: Wed Nov 14, 2007 2:48 am
Reply with quote

I am not sure. Can that be a problem?I am very new to Easytrieve.
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Wed Nov 14, 2007 3:14 am
Reply with quote

Delip wrote:
I am not sure. Can that be a problem?I am very new to Easytrieve.
I have no idea...
I've used one macro in EZT, but it was part of a copybook and generated within the the program...
Try to cut&paste the macro directly into the calling program (remove the list off) and just simplify the situation (for testing purposes)...
Back to top
View user's profile Send private message
Delip

New User


Joined: 13 Sep 2007
Posts: 46
Location: Bangalore

PostPosted: Wed Nov 14, 2007 3:22 am
Reply with quote

Hi,

What are the commands which would tell easytrieve that it is a macro.I am planning to copy in the program itself.Can you send me the code you used.
Back to top
View user's profile Send private message
lcmontanez

New User


Joined: 19 Jun 2007
Posts: 50
Location: Chicago

PostPosted: Thu Nov 15, 2007 3:46 am
Reply with quote

Where is your macro located?

Add a dd:PDS pointing to the location of the macro
Back to top
View user's profile Send private message
Delip

New User


Joined: 13 Sep 2007
Posts: 46
Location: Bangalore

PostPosted: Fri Nov 16, 2007 1:04 am
Reply with quote

though i added as pdsdd,it is not recognizing. can you help
Back to top
View user's profile Send private message
lcmontanez

New User


Joined: 19 Jun 2007
Posts: 50
Location: Chicago

PostPosted: Fri Nov 16, 2007 2:29 am
Reply with quote

Let me clarify:

Depending of your OPTTBL setup

The DDNAME for Macro library is PANDD# for PANVALET

or

The DDNAME for Macro library is PDS for PDS

This all depends on what was coded on the OPTTBL at your site.

Try the following:

//PDS DD DISP=SHR,DSN=XXXXXXX
//PANDD1 DD DISP=SHR,DSN=XXXXXXX

OPTTBL:

&LIST=(PARM,FILE), LIST OPTIONS AND STATISTICS
&MAC#LIB=1, # OF MACRO LIBRARIES
&MACDDN=PANDD, OS DDNAME PREFIX - MACRO LIBRARIES
&MACDEV=DISK, MACRO FILE DEVICE TYPE
&MACRO=PAN, MACRO SUBSYSTEM INTERFACE
&MACSYS#=0, DOS STARTING SYS# - MACRO LIBRARIES
&MONEY=$, CURRENCY SIGN
&NEWPAGE=NO, LABELS 'LINE 01' TO CC1
Back to top
View user's profile Send private message
Delip

New User


Joined: 13 Sep 2007
Posts: 46
Location: Bangalore

PostPosted: Fri Nov 16, 2007 3:32 am
Reply with quote

HI,

Thank you for the info.Where can I find OPTTBL/

Thank you,
Dileep
Back to top
View user's profile Send private message
lcmontanez

New User


Joined: 19 Jun 2007
Posts: 50
Location: Chicago

PostPosted: Fri Nov 16, 2007 3:43 am
Reply with quote

OPTTBL is usually in the CAISRC lib

again this is site specific.

Just try both DD statement - (worth a shot).
Back to top
View user's profile Send private message
Delip

New User


Joined: 13 Sep 2007
Posts: 46
Location: Bangalore

PostPosted: Fri Nov 16, 2007 3:52 am
Reply with quote

Hi,

I gave it as PDS.I gave the macro name after sysin dd* as below.

//SYSIN DD*
%ABC

It is throwing an error remaining parameters not recognised.Where should I put the macro name?
Back to top
View user's profile Send private message
Douglas Wilder

Active User


Joined: 28 Nov 2006
Posts: 305
Location: Deerfield IL

PostPosted: Fri Nov 16, 2007 4:04 am
Reply with quote

Please cut and paste the exact error message. Also include the lines that show the line in error and the line with the "$" showing where in the line the error is.
Back to top
View user's profile Send private message
lcmontanez

New User


Joined: 19 Jun 2007
Posts: 50
Location: Chicago

PostPosted: Fri Nov 16, 2007 4:29 am
Reply with quote

I agree with Douglas... Show us the code.

Don't forget to include the macro.

Is the macro a copybook (field definition) or actual EZT code like DATECONV, CBLCNVRT, CONCAT, Etc (this will determine placement).
Back to top
View user's profile Send private message
Delip

New User


Joined: 13 Sep 2007
Posts: 46
Location: Bangalore

PostPosted: Fri Nov 16, 2007 8:10 am
Reply with quote

My first few lines of the macro is :

MACRO PART1 PART2 OUTPUT
LIST OFF
DEFINE CONCAT-HOLD W 254 A
DEFINE CONCAT-SCAN CONCAT-HOLD 1 A INDEX CONCAT-NDX
DEFINE CONCAT-LENGTH W 2 P 0

The code is,
//SYSIN DD *
%CONCAT
FILE OFFLINE PRINTER

I am getting below errors,
1 %CONCAT
5 *******B014 UNABLE TO RECOGNIZE STATEMENT
*******B059 PREMATURE END OF FILE
*******A014 PREMATURE TERMINATION DUE TO PREVIOUS ERROR(S)


Please help.

Thank you in advance
Back to top
View user's profile Send private message
lcmontanez

New User


Joined: 19 Jun 2007
Posts: 50
Location: Chicago

PostPosted: Fri Nov 16, 2007 7:58 pm
Reply with quote

Concat can not be the first statement in your code.

Try the following:

Code:
 
DEFINE WS-DATA         W            80 A                   
DEFINE WS-DATA1        W             4 A VALUE 'XXXX'     
DEFINE WS-DATA2        W             4 A VALUE 'YYYY'     
                                                           
 JOB INPUT NULL                                             
                                                           
 WS-DATA  = WS-DATA1
                                       
 %CONCAT  WS-DATA  WS-DATA2 2                               

 DISPLAY 'WS-DATA =' WS-DATA                               
 STOP                                                       

//
                                                         
Back to top
View user's profile Send private message
Delip

New User


Joined: 13 Sep 2007
Posts: 46
Location: Bangalore

PostPosted: Fri Nov 16, 2007 8:25 pm
Reply with quote

My first few lines of the macro is :

MACRO PART1 PART2 OUTPUT
LIST OFF
DEFINE CONCAT-HOLD W 254 A
DEFINE CONCAT-SCAN CONCAT-HOLD 1 A INDEX CONCAT-NDX
DEFINE CONCAT-LENGTH W 2 P 0

The code is,
//SYSIN DD *
%CONCAT
FILE OFFLINE PRINTER

I am getting below errors,
1 %CONCAT
5 *******B014 UNABLE TO RECOGNIZE STATEMENT
*******B059 PREMATURE END OF FILE
*******A014 PREMATURE TERMINATION DUE TO PREVIOUS ERROR(S)


Please help.

Thank you in advance
Back to top
View user's profile Send private message
Delip

New User


Joined: 13 Sep 2007
Posts: 46
Location: Bangalore

PostPosted: Fri Nov 16, 2007 8:47 pm
Reply with quote

Hi,

The culprit was the 'List Off' command. After I removed it,it is working.Thank you.

I have another question. How and where to include a copybook,if copybook is placed in another PDS.

Thank you
Back to top
View user's profile Send private message
lcmontanez

New User


Joined: 19 Jun 2007
Posts: 50
Location: Chicago

PostPosted: Fri Nov 16, 2007 9:01 pm
Reply with quote

Add the DSN to the macro DD and then invoke the macro.

Code:

         
//PANDD    DD DSN=XXXX.XXXX.XXXXX,DISP=SHR     EZT MAC
           DD DSN=XXXX.XXXX.XXXXX,DISP=SHR     other copybooks



Is your macro lib PDS or PANVALET? Don't mixed the two on the same DD.

Code:

//SYSIN    DD *
LIST ON         

FILE INFILE     
%S1044CNP       


The MACRO STATEMENT MUST BE INCLUDED IN THE COPYBOOK.

Code:

MACRO                                                                 
** COPYBOOK S1044CNP                                                 
B044-RECORD                      1  312 A                             
B044-PROCESS-ID                  1    1 A   HEADING ('PROCESS' 'ID') 
B044-APPLICATION                 2    4 A   HEADING ('APPL')         
B044-DATA-CODE                   6    1 A   HEADING ('DATA' 'CODE')   
Back to top
View user's profile Send private message
Delip

New User


Joined: 13 Sep 2007
Posts: 46
Location: Bangalore

PostPosted: Fri Nov 16, 2007 9:23 pm
Reply with quote

Thank you very much.it is working now.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CA Products

 


Similar Topics
Topic Forum Replies
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
No new posts Error while running web tool kit REXX... CLIST & REXX 5
No new posts Getting Error while trying to establi... DB2 3
Search our Forums:

Back to Top