View previous topic :: View next topic
|
Author |
Message |
Delip
New User
Joined: 13 Sep 2007 Posts: 46 Location: Bangalore
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
Delip
New User
Joined: 13 Sep 2007 Posts: 46 Location: Bangalore
|
|
|
|
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 |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
Is the LIST OFF hiding any messages? |
|
Back to top |
|
|
Delip
New User
Joined: 13 Sep 2007 Posts: 46 Location: Bangalore
|
|
|
|
I am not sure. Can that be a problem?I am very new to Easytrieve. |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
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 |
|
|
Delip
New User
Joined: 13 Sep 2007 Posts: 46 Location: Bangalore
|
|
|
|
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 |
|
|
lcmontanez
New User
Joined: 19 Jun 2007 Posts: 50 Location: Chicago
|
|
|
|
Where is your macro located?
Add a dd:PDS pointing to the location of the macro |
|
Back to top |
|
|
Delip
New User
Joined: 13 Sep 2007 Posts: 46 Location: Bangalore
|
|
|
|
though i added as pdsdd,it is not recognizing. can you help |
|
Back to top |
|
|
lcmontanez
New User
Joined: 19 Jun 2007 Posts: 50 Location: Chicago
|
|
|
|
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 |
|
|
Delip
New User
Joined: 13 Sep 2007 Posts: 46 Location: Bangalore
|
|
|
|
HI,
Thank you for the info.Where can I find OPTTBL/
Thank you,
Dileep |
|
Back to top |
|
|
lcmontanez
New User
Joined: 19 Jun 2007 Posts: 50 Location: Chicago
|
|
|
|
OPTTBL is usually in the CAISRC lib
again this is site specific.
Just try both DD statement - (worth a shot). |
|
Back to top |
|
|
Delip
New User
Joined: 13 Sep 2007 Posts: 46 Location: Bangalore
|
|
|
|
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 |
|
|
Douglas Wilder
Active User
Joined: 28 Nov 2006 Posts: 305 Location: Deerfield IL
|
|
|
|
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 |
|
|
lcmontanez
New User
Joined: 19 Jun 2007 Posts: 50 Location: Chicago
|
|
|
|
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 |
|
|
Delip
New User
Joined: 13 Sep 2007 Posts: 46 Location: Bangalore
|
|
|
|
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 |
|
|
lcmontanez
New User
Joined: 19 Jun 2007 Posts: 50 Location: Chicago
|
|
|
|
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 |
|
|
Delip
New User
Joined: 13 Sep 2007 Posts: 46 Location: Bangalore
|
|
|
|
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 |
|
|
Delip
New User
Joined: 13 Sep 2007 Posts: 46 Location: Bangalore
|
|
|
|
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 |
|
|
lcmontanez
New User
Joined: 19 Jun 2007 Posts: 50 Location: Chicago
|
|
|
|
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 |
|
|
Delip
New User
Joined: 13 Sep 2007 Posts: 46 Location: Bangalore
|
|
|
|
Thank you very much.it is working now. |
|
Back to top |
|
|
|