Saturday, May 16, 2009

HOW TO SUBMIT JOBS TO MAINFRAME USING FTP

A Job refers to the execution of one or more related programs in sequence. JCL is a set of control statements that provide the specifications necessary to process a job. Let us see how to submit a job using the File Transfer Protocol (FTP).


Connecting to Mainframe:


1. Run the command Prompt (CMD).


2. Type FTP (Mainframe Server IP Address).


3. Enter the username and password prompted for.


4. When you mistype your password, you will see several error messages and finally an “ftp>” prompt. Type user to get another “Remote User Name” prompt.
You now have an open connection with the FTP server. Please note that your connection to theMVS FTP server is automatically closed if it is inactive for more than 5 minutes.


5. Type help to list the commands available in FTP.6. Type help commandname to list a description of a particular command7. Type quit at the “ftp>” prompt to close your session when you have completed your work with the MVS FTP server and to return to the LAN Workplace window.


Submitting a Job to MVS:


1. Create your source file with your editor and add the JCL statements.


2. Type the following command to alert MVS to place incoming files into the JES queue.ftp> quote site filetype=jes.


3. Type ls or dir to list the files on your local system (the system where you started FTP).


4. Type lcd directoryname to change the current directory on your local system if you need to.


5. Type put a:filename (filename with full path) to submit your job from the diskette in the personalcomputer A: drive. A message indicating the number of bytes transmitted and how long it took is displayed when the file is received.Example:ftp> quote site filetype=jesftp> put job.txtThis will submit the job (from file job.txt)


Displaying MVS Job Status:


Type dir to display the status of all your jobs with all the spool files a job has associated with it. (Only for job names which has your User ID).


A sample is shown:

ftp>dir200 Port request OK.

125 List started OK.

Z951234A JOB00001 INPUT

Z951234A JOB00002 HELD

Z951234A JOB00003 ACTIVE

Z951234A JOB00004 OUTPUT 3 spool Files

250 List completed sucessfully

ftp>


The strings that follow your Account ID in this list are your JOB IDs.


Retrieving a Job Output from MVS:


Type get JOBID.X a: to download all the spool files associated with a job into a file on your diskette. A new filename can be added after the “a:” if you would like the file to appear with a different filename on your diskette. The filename is optional, but without a drive letter(A:), the files are put in volatile swap space (S:).


Example 1:

ftp>get JOB00004.X a: retrieves all spool files from JOB00004 and puts them all in a file namedJOB00004 on your diskette.


Example 2:

ftp>get JOB00004.X output.txt retrieves all spool files from JOB00004 and puts them all in a filenamed output.txt on your local disk from where you gave your FTP commands.


A message indicating the number of bytes transmitted and how long it took is displayed when the file is received.


Deleting a Job on MVS:


Type delete JOBID to delete a job.


Example:ftp>delete JOB00002

No comments:

Post a Comment