How to invoke cobol jobs on mainframes


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to invoke cobol jobs on mainframes
# 1  
Old 04-18-2007
How to invoke cobol jobs on mainframes

Hi,

Does any one of you know how to invoke the cobol jobs on mainframes?

Thanks,
Waseem
# 2  
Old 04-18-2007
Check out this link for information on how you can do it:
http://publibz.boulder.ibm.com/cgi-b...20010621083253

Mind you I have never done this, but did look into it. Good luck.
# 3  
Old 04-19-2007
Do it this way via ftp:
You need JCL on the mainframe to do the job:
ie.: setup, grab the file, then run whatever on MVS

UNIX side:
[code]
echo "
verbose
open mvsnodename
user username passwd
-- getting mainframe jcl
get 'ISBA.THING.LIB(@THINGIE)' localfile
quote site submit
put localfile
quit
" > /usr/bin/ftp

This requires JES and permissions on the mvs side.
# 4  
Old 07-24-2007
Submit jobs through FTP

To Submit a job on Mainframe, the script file (on Unix) should be like:
==========================================================================
user MyUserID MyPassword
quote site filetype=jes
get 'ABC.DEF.GHI.JKL(MNO)'
bye
==========================================
And run it on Unix like:
ftp -n -i FTPServerName < FTPScriptFile

--------------------------------------------------------------------------------------------
Run FTP scripts in batch
--------------------------------------------------------------------------------------------
The FTP Server was on a Mainframe - not sure whether that makes difference.
Had to write two kind of jobs - one to get/put files on Windows, and second on Unix - here's what I had to write:



Unix, AIX+ksh:
=======================
To run it in the batch:
ftp -n -i FTPServerName < FTPScriptFile

The file is like: FTPScriptFile
===================================================
user MyUserID MyPassWord
quote site...anything you want - lrecl if you want to exchanage a seq file, jes if you want to submit a job
put LocalFileName RemoteFilename
bye
=================================





Windows: (Win2k)
=======================
To run it in the batch:
ftp -n -s:FTPScriptFile MyHostName

The file is like: FTPScriptFile
===================================================
USER MyUserID
MyPassWord
prompt n
quote site lrecl=999999999
put LocalFileName RemoteFilename
bye
=================================
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Migrating jobs from COBOL Mainframe system to UNIX system

In a nutshell requirement is to migrate the system from mainframe environment to UNIX environment (MF cobol would be used I guess). I have not much of idea in this field. I need to do some investigation on following points - - Ease of conversion - Known Data compatibility issue - Issue in... (9 Replies)
Discussion started by: Tjsureboy4me
9 Replies

2. Shell Programming and Scripting

Shell script to run multiple jobs and it's dependent jobs

I have multiple jobs and each job dependent on other job. Each Job generates a log and If job completed successfully log file end's with JOB ENDED SUCCESSFULLY message and if it failed then it will end with JOB ENDED with FAILURE. I need an help how to start. Attaching the JOB dependency... (3 Replies)
Discussion started by: santoshkumarkal
3 Replies

3. Cybersecurity

Using sftp from mainframes to other server

HI all I need a script that would take the file from a mainframe to another server.Presently i am using a ndm but i am not knowing what the changes would be required to change to sftp. Can you please provide some code that would be helpful Thanks (7 Replies)
Discussion started by: msandeep27
7 Replies

4. Shell Programming and Scripting

waiting on jobs in bash, allowing limited parallel jobs at one time, and then for all to finish

Hello, I am running GNU bash, version 3.2.39(1)-release (x86_64-pc-linux-gnu). I have a specific question pertaining to waiting on jobs run in sub-shells, based on the max number of parallel processes I want to allow, and then wait... (1 Reply)
Discussion started by: srao
1 Replies

5. Shell Programming and Scripting

Calling script from RM cobol and returning value to cobol

Is there a way you can return a value from a script that is called from a rm cobol program... 01 WS-COMD-LINE-PGM X(39) value sh ./getUserId.sh 12345" 01 WS-RETURN-SYS-CODE PIC 9(8). CALL "SYSTEM" USING WS-COMD-LINE-PGM GIVING WS-RETURN-SYS-CODE. ... (1 Reply)
Discussion started by: pavanmp
1 Replies

6. UNIX for Dummies Questions & Answers

FTP to Mainframes from Unix

Hi, Iam new to unix.I have 3 files to be FTPied to Mainframe from Unix(Sun Solaries Unix). Sample record in one file is as shown below. 123ßRajß123-456ßjackßß 124ßRajeshß123-457ßjacmßß In the above file the records are seperated by delimitter "ß". When I used the below script to FTP from Unix... (3 Replies)
Discussion started by: Rahul321
3 Replies

7. UNIX for Dummies Questions & Answers

Problem in FTP from Unix to Mainframes

Hi, I have one file to FTP from Unix to mainframe. It has been successfully FTPied. But problem is my Unix file will be generated as file_name1.sh. But Mainframes side they need file in file.name1.sh. So they dont need underscore (_) in the file name. Please let me know if there is any solution... (1 Reply)
Discussion started by: manneni prakash
1 Replies

8. Programming

cobol crn programme run on express cobol as .gnt

can i run .crn programme in express cobol which support to .gnt programme .... Plz tell me solution (2 Replies)
Discussion started by: bibi
2 Replies

9. Shell Programming and Scripting

background jobs exit status and limit the number of jobs to run

i need to execute 5 jobs at a time in background and need to get the exit status of all the jobs i wrote small script below , i'm not sure this is right way to do it.any ideas please help. $cat run_job.ksh #!/usr/bin/ksh #################################### typeset -u SCHEMA_NAME=$1 ... (1 Reply)
Discussion started by: GrepMe
1 Replies

10. UNIX for Dummies Questions & Answers

FTP file to Mainframes

Hi, Can somebody please share a sample Korn shell script that will FTP a file from an Unix box to a region in Mainframe.It will be of great help if i can get this script ASAP.Or atleast give me a hint on how to do it. Thanks, Gopi (1 Reply)
Discussion started by: bhgopi
1 Replies
Login or Register to Ask a Question