Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automating a transmit directly from AS/400 root dir to bank

Status
Not open for further replies.

billwat

Programmer
Mar 7, 2004
4
US
Hey all,

I've been about everywhere looking into a problem I've got and can't find anything. Maybe somebody here has an idea.
I need to create a script(?) that will transmit a file to the bank directly from our Iseries/400(AS/400 to old guys like me).
Currently we use file transfers to put these files in a shared drive and transmit from there but this needs to be changed for security reasons.
I have created and tested a few scripts using different methods(MKDIR, CHDIR, etc.) and come up short. I am able to map a drive to the root and see data but can't leave access to any such mapped drive.
We are using version 4.70 and I'm brand new using ASPECT.
Any ideas would be appreciated.

Thanks,
Bill
 
So if I understand correctly, the machine is accessible by mapping a drive in Windows, but you cannot do this? The only other option I can think of (since most of Procomm does not handle UNC paths) is to FTP the file to the local machine (this can be scripted in Procomm), then send it to the bank after the file copy has completed.


aspect@aspectscripting.com
 
Thanks much for your reply.
My problem is that I need to change our current method of FTP'ing to the local machine and transmitting to something where Procomm goes up and gets the file and transmits so that our Operators don't have any access to these confidential files.
I am able to map a drive once logged into the 400 using OpsNav. One of my attempts was to emulate this procedure in a script and then to kill the mapping but so far no luck.
If I can come up with something I'll be happy to post it here.
If not I'll be transferred to the tundra.

Bill
 
I take it that the mapping is done by sending the proper commands over a telnet or modem connection to the server? If so, you can try using Procomm's script recorder when you perform these commands, then it can create a script that will play back those commands when executed. Here is some more information on the script recorder from my site:

If you are trying to create a script that automates communications with a remote system and the text is relatively constant, you can make the task easier by using the Script Recorder to create your script. To enable the Script Recorder, select the Tools | Scripts | Start Recorder menu item. Procomm Plus will now monitor all incoming data and your outgoing responses to that data. Start performing the tasks (keyboard-based only!) that you want Procomm Plus to record. Once done, select the Tools | Scripts | Stop Recorder menu item. You will be prompted to save your recorded script; some editing of the script may be necessary. Be aware that if you dialed an entry from the Connection Directory, then your recorded script will be attached to that entry unless you change the value at the bottom of the Save As dialog. When you view your script, you will see that it is composed of waitfor/transmit commands. If all looks well, compile your script and see if it executes as expected. To make a recorded script more extensible, you can take a recorded script and replace some of the recorded strings with variables so that a more general script can be created.

aspect@aspectscripting.com
 
Thanks again for your reply.
I have already tried the recorder and no go.
I'm pretty well restricted to logging into the 400 by using IBM's Operations Navigator(Windows based GUI). Once logged in I can map a drive and access what I want. I'm trying to re-create this process and when I simply started the recorder and went through the steps it didn't record any of the OpsNav procedures. I've also tried several methods of embedding OpsNav's underlying AS/400 Logon .exe pgm into the script with Username/Password from the profile I created and test with on the 400. No go.
The Tundra awaits.
 
OK, didn't realize that you had to use a GUI-based program to perform the operations. What you could try instead is something along these lines:

1. Write a script that uses the run command to launch the appropriate executable.
2. Using the winactivate command, bring that executable to the foreground.
3. You can then use the sendkey, sendvkey, and and sendkeystr commands to send commands to that window. You may need to use some commands, such as sendkey 0x09 to send a tab if you need to place focus elsewhere in that window.


aspect@aspectscripting.com
 
Very cool.
I'm in the middle of a Lawson quirk right now but will try along these lines asap.
Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top