Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
PCOMM macro to call another PCOMM macro

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
View previous topic :: :: View next topic  
Author Message
boyti ko

New User


Joined: 03 Nov 2014
Posts: 78
Location: Malaysia

PostPosted: Tue Jul 12, 2016 4:30 pm    Post subject: PCOMM macro to call another PCOMM macro
Reply with quote

Hi,

I'm trying to call a PCOMM macro inside another PCOMM macro. But having this error: Variable is undefined: 'test_macro'.
Both macros are in the same folder.
Please help me to point out on how to do it correctly.

This is the macro I used to call another macro.
The "test_macro" is another macro which is working normal on its own.
Code:

[PCOMM SCRIPT HEADER]
LANGUAGE=VBSCRIPT
DESCRIPTION=
[PCOMM SCRIPT SOURCE]
OPTION EXPLICIT
autECLSession.SetConnectionByName(ThisSessionName)

REM This line calls the macro subroutine
subSub1_

sub subSub1_()
   call test_macro
end sub


This is what I found in the manual.

Call Statement
Description - Transfers control to another macro file. When the Exit command in the second macro file is encountered, execution returns to the command that follows Call statement Up to 10 levels of macro files can be called
Syntax : Call MacroFilename

I'm using Quick3270™ Macro Language Reference Manual Version 4.52 as a reference.
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8201
Location: East Dubuque, Illinois, USA

PostPosted: Tue Jul 12, 2016 6:18 pm    Post subject:
Reply with quote

So "test_macro" is stored in the directory without any extension? If it has an extension, you need to either remove the extension so the call can find the macro file, or add the extension to the call statement filename.
Back to top
View user's profile Send private message
boyti ko

New User


Joined: 03 Nov 2014
Posts: 78
Location: Malaysia

PostPosted: Wed Jul 13, 2016 7:30 am    Post subject:
Reply with quote

Hi Robert,

Thanks for your reply.

I have followed your advice. Initially, both macro have the extension of .mac

I tried removing the extension of test_macro in the directory then run the same macro I posted above.

Then I also tried putting the .mac extension in both of the file and inside the macro.

Both still resulted in the same error of - Variable is undefined: 'test_macro'.

Would I be needing to declare something?
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2088
Location: Silicon Valley

PostPosted: Wed Jul 13, 2016 9:46 pm    Post subject: PCOMM macro to call another PCOMM macro
Reply with quote

Quote:
I'm using Quick3270™ Macro Language Reference Manual Version 4.52 as a reference.


Can you clarify the environment?

What I gleaned from that manual: PCOMM macros will work in the Quick3270 emulator.

But I doubt there is a similar statement that Quick3270 macros will run in the PCOMM emulator. You should refer to the PCOMM manual.
Back to top
View user's profile Send private message
boyti ko

New User


Joined: 03 Nov 2014
Posts: 78
Location: Malaysia

PostPosted: Thu Jul 14, 2016 3:26 pm    Post subject:
Reply with quote

Hi Pedro,

First of all, let me thank you. Recently, I have read your 'Share in Orlando' and help me lot in my last activity.

Back to the topic at hand, I'm doing it on PCOMM. It says here that it is version 6.0. This is the closest I got when checking the PCOMM manual. link but I still didn't figure out how to use the "Start Playing Macro (110)" indicated there.

Since the language indicated at the header is VBSCRIPT, I also tried doing this, but it seems it's only for .vbscript and not for .mac

Code:
[PCOMM SCRIPT HEADER]
LANGUAGE=VBSCRIPT
DESCRIPTION=
[PCOMM SCRIPT SOURCE]
OPTION EXPLICIT
autECLSession.SetConnectionByName(ThisSessionName)
   
dim ObjShell
Set objShell = CreateObject("WScript.Shell")
ObjShell.Run "cscript \\C:\ProgramData\IBM\Personal Communications\test_macro.mac"


If I map the keyboard, I can assign the PLAY function. The assigned key will have [Play]. I was thinking that after the PLAY function work, I just need to select the correct macro from there or maybe even have a parameter to accept what macro I want to run.

Out of curiosity, I even tried using these commands but still unable to do it.

Code:
autECLMacro "[Play]"


Code:
autECLSession.autECLPS.SendKeys "[Play]"
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 -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. ISREDIT Macro is not returning back t... nico_neoz CLIST & REXX 21 Sat Nov 18, 2017 7:40 pm
No new posts IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm
No new posts Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 4 Tue Sep 26, 2017 3:07 am
No new posts exec macro in the end of edit anatol CLIST & REXX 8 Fri Sep 22, 2017 5:10 am
No new posts How to Run Rexx Macro? Kalaivignesh CLIST & REXX 5 Fri Sep 01, 2017 9:08 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us