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
 

 

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: 7914
Location: Bellevue, IA

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: 2019
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
No new posts Cobol EZASOKET call to SETSOCKOPT fails Andi1982 COBOL Programming 6 Thu Oct 06, 2016 7:12 pm
No new posts Strange EXEC function call in z/VM Willy Jensen CLIST & REXX 3 Wed Oct 05, 2016 2:07 pm
No new posts COBOL DB2 - CALL statement - high CPU... TS70363 DB2 15 Sun Sep 11, 2016 6:07 am
No new posts Is possible to call subprogram from c... cmsmoon COBOL Programming 3 Fri Aug 05, 2016 6:46 pm
No new posts Send parameter for macro STIMERM from... Daniel Teolotitla PL/I & Assembler 13 Tue Jul 05, 2016 9:23 pm


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