PComm - Macro that will fill information for you.

moktarious
StarLounger
Posts: 61
Joined: 08 Oct 2011, 21:25

PComm - Macro that will fill information for you.

Post by moktarious »

Ok now let start a new Macro.

What I want to create it's a input box that will let you choose between the following information.

All drop down style list
Product: a few product will be listed there (entered in the script manually)
Status: two option possible Open/Close
Queue: 2/3 option will be listed there (entered in the script manually)
Date: date of the day in this format. Let's say today 11/10/11 it will be 111011

Anyone can help?

moktarious
StarLounger
Posts: 61
Joined: 08 Oct 2011, 21:25

Re: PComm - Macro that will fill information for you.

Post by moktarious »

Anyone can tell me where to start please

User avatar
HansV
Administrator
Posts: 78524
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: PComm - Macro that will fill information for you.

Post by HansV »

Please be patient. All members of our site are volunteers who spend some of their free time to help others; they have others things to keep them busy too.
And PCOMM is a rather specialised subject - most of us are not familiar with it.
Best wishes,
Hans

User avatar
VegasNath
5StarLounger
Posts: 1185
Joined: 24 Jan 2010, 12:02
Location: Wales, UK.

Re: PComm - Macro that will fill information for you.

Post by VegasNath »

All within PCOMM? I would not know where to start I'm afraid.

Annoyingly, I never found this board when I first started years ago, but came across it yesterday..... ibmmainframes.com. The IBM Tools forum may be a good place to start, possibly worth a try.
:wales: Nathan :uk:
There's no place like home.....

moktarious
StarLounger
Posts: 61
Joined: 08 Oct 2011, 21:25

Re: PComm - Macro that will fill information for you.

Post by moktarious »

Sorry HansV I wasn't trying to rush anymore.
Vegas Thanks for the site address.

Quick question what is the syntax for a drop down list menu?

User avatar
HansV
Administrator
Posts: 78524
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: PComm - Macro that will fill information for you.

Post by HansV »

I don't think you can create dropdown lists in pure, stand-alone VBScript. You'd either have to create a web page, in which you can use form elements, or work from within an Office application such as Word or Excel, where you can create userforms. (VegasNath worked with PCOMM from Excel)
Best wishes,
Hans

moktarious
StarLounger
Posts: 61
Joined: 08 Oct 2011, 21:25

Re: PComm - Macro that will fill information for you.

Post by moktarious »

Hansv let's try a different approach

Here is the actual screen

source ___ customer ___________________
product ____ _________ BU ________ queue ___ ______ workgroup ____
type _ O/C _ from ______ to 111011 I _ RC _ enterprise __________ pnl A
CMD=>

We fill the information then press enter (it will search the queue for that information)
Me what I wanted to do is to create a macro, that will let us choose the information of each field, then when we press ok it will paste the information on the session screen. Making the search more user friendly and faster. U follow me sir?

User avatar
HansV
Administrator
Posts: 78524
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: PComm - Macro that will fill information for you.

Post by HansV »

I don't know if that can be done in PCOMM, but I doubt it.
Best wishes,
Hans

moktarious
StarLounger
Posts: 61
Joined: 08 Oct 2011, 21:25

Re: PComm - Macro that will fill information for you.

Post by moktarious »

HansV i have a question can I make a single input box appears that the information I fill there be paste in a certain row/line?

User avatar
HansV
Administrator
Posts: 78524
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: PComm - Macro that will fill information for you.

Post by HansV »

As far as I can tell, you should be able to use code like this:

strSource = InputBox("Enter the source here", "My Application")
autECLSession.autECLPS.SetText strSource, 1, 8
inputbox.png
This code will ask the user to enter some text, then enter this text in the PCOMM screen at row 1, column 8.
You do not have the required permissions to view the files attached to this post.
Best wishes,
Hans

moktarious
StarLounger
Posts: 61
Joined: 08 Oct 2011, 21:25

Re: PComm - Macro that will fill information for you.

Post by moktarious »

Let me try something and I will paste it to let u know sir.

Thanks

moktarious
StarLounger
Posts: 61
Joined: 08 Oct 2011, 21:25

Re: PComm - Macro that will fill information for you.

Post by moktarious »

HansV is it possible to have an input box with more then one field to fill?

User avatar
HansV
Administrator
Posts: 78524
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: PComm - Macro that will fill information for you.

Post by HansV »

No, an input box asks for one string at a time.
You can display as many input boxes as you need in a script.

If you want an input form similar to the one in the screenshot below, you'll have to work from within an application that supports such forms, such as Excel or Word, or create a program in a compiler such as Visual Basic Express. You cannot create such forms in script.
userform.png
You do not have the required permissions to view the files attached to this post.
Best wishes,
Hans

moktarious
StarLounger
Posts: 61
Joined: 08 Oct 2011, 21:25

Re: PComm - Macro that will fill information for you.

Post by moktarious »

So our best approach will be input box followed one after one?

User avatar
HansV
Administrator
Posts: 78524
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: PComm - Macro that will fill information for you.

Post by HansV »

Yes, if you want to use script, you're limited to displaying input boxes one after another.
Best wishes,
Hans

moktarious
StarLounger
Posts: 61
Joined: 08 Oct 2011, 21:25

Re: PComm - Macro that will fill information for you.

Post by moktarious »

Look what I found, let me know if that could do it please

http://www.actuarialoutpost.com/actuari ... ?p=3613458

User avatar
HansV
Administrator
Posts: 78524
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: PComm - Macro that will fill information for you.

Post by HansV »

That doesn't do anything when I try it...
Best wishes,
Hans

moktarious
StarLounger
Posts: 61
Joined: 08 Oct 2011, 21:25

Re: PComm - Macro that will fill information for you.

Post by moktarious »

So let's stick to the first solution u told me and we go from there.

strSource = InputBox("Enter the source here", "My Application")
autECLSession.autECLPS.SetText strSource, 1, 8

Do we have any other choice beside OK and Cancel?

User avatar
HansV
Administrator
Posts: 78524
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: PComm - Macro that will fill information for you.

Post by HansV »

An InputBox always displays OK and Cancel buttons; pressing Enter is the same as clicking OK and pressing Esc is the same as clicking Cancel.
You can't display other buttons.
Best wishes,
Hans

moktarious
StarLounger
Posts: 61
Joined: 08 Oct 2011, 21:25

Re: PComm - Macro that will fill information for you.

Post by moktarious »

Now how can we make the input box do something after the CANCEL was pressed? like go to a certain position on the script and execute it