Click to See Complete Forum and Search --> : Using VB to start a mainframe job


JimM
August 29th, 2001, 08:27 AM
Here's an interesting challenge for anyone who would like to try. I'm using VB to start a production mainframe job. It works great with one minor annoying problem.

First I use WinInit to verify the mainframe Logon Id and password. Then I accept variable data to pass to the mainframe and FTP a text data file to the mainframe. That works well. Then I use the following files that I send to my C:\Temp directory to start the mainframe job as follows.

File crdjcl.txt - this is a .txt file that looks like a mainframe job card and execute and gets sent to our mainframe scheduling system. When it receives this file it puts the m/f job in the que to start.

File crdlogon.txt

My m/f Logon Id on this line
quote site file=jes
put c:\temp\crdjcl.txt

File crdtomf.bat - this is a bat file to execute the above file.

I then use Shell in the VB program to execute the crdtomf.bat file as follows.

RetVal = Shell("c:\temp\crdtomf.bat, vbNormalFocus)

Everything works fine except I get a mainframe window requiring that I enter my password again. I've tried everything I can think of including adding my password after the logon id in the crdlogon.txt file as follows.

LogonId:password

I've also put the password on the 2nd line which also does not work.

Nothing seems to work. This is not a crisis since the job runs ok but I would like to eliminate the cumbersome 2nd password check.

Does anyone know a better way to do this. It seems like there must be a way to send a command directly to the internal reader using FTP. Perhaps there is a way to send a site command first so that the put gets directed to the internal reader instead of just to a m/f file.

Thanks in advance for any help.

Jim

DSJ
August 29th, 2001, 09:47 AM
What kind of mainframe you talking about?

JimM
August 29th, 2001, 09:57 AM
It's an IBM 390 Mainframe

DSJ
August 29th, 2001, 10:22 AM
Not familiar with 390's, but used to do some VB stuff with AS/400's. ClientAccess was what we used to connect to the 400, you could do about anything you wanted. Is there a ClientAccess or equivelent for 390's?

JimM
August 29th, 2001, 10:54 AM
I'm having difficulty sending a reply. This is the 3rd time I have tried. The first 2 were not posted. If you get the others that why.

Anyway I'm not familiar with Client Access but I'll check it out.

Thanks, Jim