Excel Copy/Paste Macro to another open application. QWS3270

G

Guest

I have data in a series of spreadsheet cell's that needs to be keyed
one at a time to another application called QWS3270. I am running
macros within QWS3270 that wait's for a user input that can be pasted
from the windows clipboard.

The data will always be in specifc cells so a basic script to copy
each cell location to the clipboard will work but the trouble I am
having is how to have excel call the QWS3270 window active and paste
the data to the waiting prompt and then send an "Enter" keystroke in
the QWS3270 window before returning to excel for the next cell.

It's Excel 2003 running under XP

Thanks!
 
J

Joel

It may be better to transfer the data through a file. Can you have the
QWS3270 check every 5 seconds to see if a file exists. You can have EXCEL
generate the file with the data. then when QWS3270 see the file it can read
the data and continue. QWS3270 can also delete the file. The file can be
used as a semaphore to synchronize the two programs.
 
G

Guest

It may be better to transfer the data through a file. Can you have the
QWS3270 check every 5 seconds to see if a file exists. You can have EXCEL
generate the file with the data. then when QWS3270 see the file it can read
the data and continue. QWS3270 can also delete the file. The file can be
used as a semaphore to synchronize the two programs.








- Show quoted text -

Thank you for the reply. I did explore the "putfile" command within
3270. I don't think I can make this work because I can't just upload
a text file to the host, I have to place the excel cell values to
specifc cursor locations within the 3270 window, which under the
current scipt the cursor is placed to the input postion and then
populated with a user "prompt" command. It would be nice if I could
replace the user prompt with "type" command using a text file as the
source but I don't see this option. Am I missing something in 3270?
 
J

Joel

I don't know QWS3270. IBM mainframes are the only type computers I've never
worked on. I assume you are running under an IBM operating system and not
something like UNIX. There are lots of ways to do this in UNIX.

In UNIX your would do something like

cat "Output this line to a file" > Myfile.txt
or
echo "Output this line to a file" > Myfile.txt

DOS would use

echo "Output this line to a file" > Myfile.txt

Another way of doing this is to open a text editor and then save the data
 
G

Guest

I don't know QWS3270. IBM mainframes are the only type computers I've never
worked on. I assume you are running under an IBM operating system and not
something like UNIX. There are lots of ways to do this in UNIX.

In UNIX your would do something like

cat "Output this line to a file" > Myfile.txt
or
echo "Output this line to a file" > Myfile.txt

DOS would use

echo "Output this line to a file" > Myfile.txt

Another way of doing this is to open a text editor and then save the data






- Show quoted text -

Getting the data to a .txt file is simple enough. The only challenge
is how to populate the QWS3270 prompts with the txt. I think the
clipboard is going to be the only way with some kind of copy/paste
code. I just really wanted to avoid using sendkeys because this
process needs to be reliable.
 
J

Joel

I have writen macros using PROCOMM which is another terminal emulation
program similar to QWS3270. Your question about writen text to the IBM host
is simple and is no different from the present command yoiu are using.

If you are sending commands like >Run myprogram.exe <CR>. then sending text
to an editor is the same. If Notepad was on the IBM mainframe it would be
something like this
Notepad Myfile.txt <CR>
This is the first line of text <CR>
This is the second line of text <CR>
ALT<F>ALT<x>

The last line are the keys to close notepad.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top