Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Getting error when trying to use Macros in Easytrieve.
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products
View previous topic :: :: View next topic  
Author Message
Delip

New User


Joined: 13 Sep 2007
Posts: 45
Location: Bangalore

PostPosted: Tue Nov 13, 2007 11:49 pm    Post subject: Getting error when trying to use Macros in Easytrieve.
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

Site Director


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

PostPosted: Wed Nov 14, 2007 12:55 am    Post subject:
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: 45
Location: Bangalore

PostPosted: Wed Nov 14, 2007 2:29 am    Post subject: Reply to: Getting error when trying to use Macros in Easytri
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: 2150
Location: At my coffee table

PostPosted: Wed Nov 14, 2007 2:44 am    Post subject:
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: 45
Location: Bangalore

PostPosted: Wed Nov 14, 2007 2:48 am    Post subject: Reply to: Getting error when trying to use Macros in Easytri
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: 2150
Location: At my coffee table

PostPosted: Wed Nov 14, 2007 3:14 am    Post subject: Re: Reply to: Getting error when trying to use Macros in Eas
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: 45
Location: Bangalore

PostPosted: Wed Nov 14, 2007 3:22 am    Post subject: Reply to: Getting error when trying to use Macros in Easytri
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    Post subject:
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: 45
Location: Bangalore

PostPosted: Fri Nov 16, 2007 1:04 am    Post subject:
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    Post subject:
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: 45
Location: Bangalore

PostPosted: Fri Nov 16, 2007 3:32 am    Post subject:
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    Post subject:
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: 45
Location: Bangalore

PostPosted: Fri Nov 16, 2007 3:52 am    Post subject:
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    Post subject:
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    Post subject:
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: 45
Location: Bangalore

PostPosted: Fri Nov 16, 2007 8:10 am    Post subject:
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    Post subject:
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: 45
Location: Bangalore

PostPosted: Fri Nov 16, 2007 8:25 pm    Post subject:
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: 45
Location: Bangalore

PostPosted: Fri Nov 16, 2007 8:47 pm    Post subject:
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    Post subject:
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
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products All times are GMT + 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts S922 Error yuvan ABENDS & Debugging 3 Fri Dec 02, 2016 6:58 pm
No new posts Invoke Webservice Fails with DFHPI100... divated CICS 2 Thu Nov 24, 2016 5:57 pm
No new posts Error during restore rename archanamuthukrishnan All Other Mainframe Topics 2 Fri Oct 14, 2016 3:30 pm
No new posts Error IEC161I 052(009,XXXRS00)-084 wh... amitc23 JCL & VSAM 10 Wed Oct 12, 2016 5:00 pm
No new posts Easytrieve - Report writing - Only 1 ... Abhi Nature CA Products 2 Wed Sep 14, 2016 11:40 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us