How to submit your Mainframe Job from windows

 

You can submit any mainframe JCL from your desktop using just a few FTP commands, to do so follow the below steps.

To submit a mainframe job first you need to establish connectivity with your mainframe, to do this type the below command from your command prompt in windows

C:\>ftp

ftp> OPEN xx.xxx.x.xxx (mainframe IP Address)

You will be prompted to enter your mainframe user name and password

User (xx.xxx.x.xxx:(none)): USERNAME

Password: xxxxx

Once you enter your user name and password correctly you should get the below message

230 User name is logged on.  Working directory is “Username.”.
ftp>

Now you have successfully connected to mainframe and can use the regular “PUT” or “GET” command to transfer files from and to your mainframe library, but will not submit a mainframe jobs to the job queue

To submit a JCL ,  issue the below command

ftp> quote site filetype=jes

This commands makes the FTP server to route any file handling commands to the Job entry spool. You can list the jobs in your spool at this point by using the DIR and LS command.

Save the JCL you would like to submit as a .txt file on your windows machines. You can test using a simple job as the one show below .

//FTPJOB1 JOB MSGCLASS=X MSGLEVEL=(1,1),CLASS=A,                  

//         REGION=5M,NOTIFY=&SYSUID                                

//*********************************************************

//* Test job to be submitted from windows

//*********************************************************

//STEP1   EXEC PGM=IEFBR14                                        

//SYSPRINT DD SYSOUT=*                                              

//SYSOUT   DD SYSOUT=*                                              

//*********************************************************

Now use the ‘PUT’ command to send the .txt file containing your JCL to JES Spool

ftp> put   ‘c:/desktop/ftpjob.txt’

You should get the below messages

200 Port request OK

125 Sending Job to JES internal reader FIXrecfm 80

250 It is known to JES as JOBID

250 transfer completed successfully

The jobs is now successfully submitted to spool and you can check the job in SDSF using the JOBID or issue the DIR command in the ftp prompt to see the list of JOBs in your SPOOL.

To set the FTP transfer back to your PC and dataset, you can use the below command

ftp> quote site filetype=seq 

If you have any questions please feel free to list them in the comments session below and we would get back to you.

 

Cheers!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Mainframe Wiki © 2015 Frontier Theme