Executing JCL through UNIX


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Executing JCL through UNIX
# 1  
Old 01-16-2004
Executing JCL through UNIX

Hi,

I am trying to execute a JCL in mainframe through solaris but it doent seem to work.

I have used the following script on a suggestion

#!/bin/ksh
ftp -n << EOF
open <servername>
user <userid> <password>
ascii
site file=jes
put <JCLfilename>
quit
EOF

It requires the JCL file to be in the dir from which I am executing this script which is ok. However the comman "site file" just does not work. iT says unrecognized command.
Though the above does FTP the file to mainframe system but it does not "submit" the JCL which is what I want.

Is there anyother way that I can achieve this?

Thanks
Manish
# 2  
Old 01-17-2004
So you mainframe speaks TCP; you don't have to use SNA? Lucky you...

The site file has to be a valid "path" that you have access rights to as well. What errors are you seeing errors on the mainframe side?

Cheers,

Keith
# 3  
Old 01-17-2004
ftp is just a way to transfer files. I don't understand why you expect it to run stuff.

We use ftp to our mainframe, but it just transfers files back and forth.

You might try:
site help
to see what site commands the server supports.
# 4  
Old 01-18-2004
Quote:
Though the above does FTP the file to mainframe system but it does not "submit" the JCL which is what I want.
I'm not entirely surprised, but I am surprised that you are able to remotely FTP to the Mainframe. I was hard pressed to find many sites that allow their mainframes to be controlled remotely; and further more from a simple FTP script too.

I've worked at a number of mainframe sites that support TCP/IP. And at all of them, the mainframe dictates what goes in or out. So if you wish to upload JCL and execute it, then get yourself a logon and create your own JCL to upload and execute. It's nothing more than a security issue.

You'll find benefits in maintaining a dataset on the mainframe for just these types of uploads, now and in the future. It is also makes what you do on the mainframe more accountable. At the site I work at currently, we FTP everything from a downloade of simple report files to the uploading and compiling of source file. All controlled from the mainframe.

Best of luck to you.
# 5  
Old 01-19-2004
Well yes the FTP works fine....and It should because the script logs on to MF server and FTPs the file there. What doesnt work is the command "site file".
MF is not recognizing this command and I was exepcting this to SUBMIT the JCL once its been FTPd.
The help gives me the following:
----
SIte subcommand--Send site-specific information to a host

Purpose

Use the SIte subcommand to send information that is used by the remote
host to provide services specific to that host system.
---

The error i get is "?Invalid command"!

Usually I use connectdirect to FTP my files to MF, this is something new I was trying. and this FTP workd and did FTP the file onto MF.

Site File should work if I give it directly on MF, as described in the help. This script should logon remotely to MF and execute this command. This is what is not happening.

I will see if something else works, if it does, will post back.

Thanks
# 6  
Old 01-19-2004
Interesting thought process. I imagine that the SItecommand is ftp MF specific. I've always used ConnectDirect as well for such tasks and hadn't seen the other (having to go through an SNA gateway). Browsing the web I found references that indicated that before placing the file you had to state:

quote site filetype=jes

in order to have it interpreted as a JCL. The idea looks the same with a slightly different syntax. Unfortunately I have to MF to test it on.

Cheers,

Keith
# 7  
Old 01-19-2004
Hey Kduffin......this worked!
The syntax I was using was wrong.
With this it worked fine.

I created a jcl file and stored it in UNIX, the work of this jcl file was to send an email to me through MF once submitted. Then I used the script i mentioned above, with the syntax mod that you had mentioned, and I got the mail from MF, it worked.

Smilie

Thanks
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Executing of UNIX script using email

Dear Unix Leads, can you please let me know is it possible to execute a shell script in UNIX machine sending an email from outlook or gmail ? or is it possible to generate a token file in UNIX by sending email which we can indirectly use to trigger script your response on this is highly... (5 Replies)
Discussion started by: mirwasim
5 Replies

2. Shell Programming and Scripting

Mainframe SAS JCL to Korn Shell script conversion

Hi All, Please help me to the conversion of Mainframe SAS JCL to korn Unix script. Please share the example from SAS JCL to Korn Unix Script. It be really helpful. Please share the online source also so I can look into it. Thanks, Abhishek (5 Replies)
Discussion started by: Abhishek Tyagi
5 Replies

3. UNIX for Advanced & Expert Users

Can we execute Mainframe JCL thru UNIX

Hi, can we execute mainframe jcl in Unix system. I want to run jcl in unix instead of mainframe. Thanks in advance. Please post in an adequate forum! (6 Replies)
Discussion started by: Rajeev Das
6 Replies

4. Solaris

passing an input parameter like date thru jcl using BPXBATCH utility

Hi.... i need to pass the dates (from - to) as the input parameters thru jcl invoking BPXBATCH utility. I know that PARM will do the above functionality. But how the above dates passed through jcl will be linked in the java-db2 program to be used in sql queries in order to generate the report... (0 Replies)
Discussion started by: Sujatha Gowda
0 Replies

5. Shell Programming and Scripting

Executing pl/sql using sqlplus on unix

Hi to all, I have a endday.sh file. And I execute this like "sh endday.sh" from command prompt. In endday.sh file it writes: sqlplus temp/temp@data @run.sql& echo $!>>pid.txt However my aim is not to put the pid into pid.txt but I need to insert the pid into an oracle table using sqlplus.... (1 Reply)
Discussion started by: maverick1234
1 Replies

6. UNIX for Advanced & Expert Users

Executing pl/sql using sqlplus on unix

Hi to all, I have a endday.sh file. And I execute this like "sh endday.sh" from command prompt. In endday.sh file it writes: sqlplus temp/temp@data @run.sql& echo $!>>pid.txt However my aim is not to put the pid into pid.txt but I need to insert the pid into an oracle table using sqlplus.... (1 Reply)
Discussion started by: maverick1234
1 Replies

7. Programming

Executing pl/sql using sqlplus on unix

Hi to all, I have a endday.sh file. And I execute this like "sh endday.sh" from command prompt. In endday.sh file it writes: sqlplus temp/temp@data @run.sql& echo $!>>pid.txt However my aim is not to put the pid into pid.txt but I need to insert the pid into an oracle table using sqlplus.... (1 Reply)
Discussion started by: maverick1234
1 Replies

8. UNIX for Dummies Questions & Answers

Executing a unix command

Hi, I need to execute the following unix command through my java code - zip -e When i execute this command from the command prompt, i am prompted for a password in the following manner - Enter password: Verify password: Is it possible to provide the password inthe first command itself... (5 Replies)
Discussion started by: jacob23
5 Replies

9. UNIX for Dummies Questions & Answers

any such thing as JCL for Unix?

beyond newbie but I figured, what better place to ask than the "dummies" section :) Please point me to any online documentation for such a beast if it exists. thanks (11 Replies)
Discussion started by: jump23
11 Replies

10. UNIX for Dummies Questions & Answers

Executing UNIX command from java on NT

Hi - I am totally new to UNIX so please bear with me... I run a java program on Win NT server to do file ftp to UNIX server. I log in, cd, create ftp file on UNIX and quit from my java progam - all works well. Now I want to execute a script on UNIX. At the UNIX 'console'/'shell' (!?) you... (1 Reply)
Discussion started by: CJ Walt
1 Replies
Login or Register to Ask a Question

Featured Tech Videos