This post is about an alternative for remote job entry, you can use the TCP/IP FTP service in zOS and a Shell/command prompt to retrieve, List, and submit Jobs to Mainframe.
Basic Commands used in this article
FTP - To start FTP
Open remore_system_ip - To connect to host via FTP
QUOTE site filetype=JES - Connect to JESPLEX, (conect to JES in layman terms)
DIR - List Jobs
Get filename - Get Job dataset from remote system
PUT filename - Submit Job
Make Sure that the FTP is up and running in your mainframe system.
You can do this by find the “TCPIP” job in your spool.
Connect to Mainframe via FTP
Open the command prompt/Shell and Enter FTP.
Enter Open your mainframe_host_ip
Enter your user ID followed by password
C:\>ftp ftp> open demomvs.demopkg.ibm.com
Connected to demomvs.demopkg.ibm.com. 220-FTPD1 IBM FTP CS V1R13 at demomvs.demopkg.IBM.COM, 05:53:23 on 2012-11-30. 220 Connection will close if idle for more than 5 minutes. User (demomvs.demopkg.ibm.com:(none)): dds1764 331 Send password please. Password: 230 DDS1764 is logged on. Working directory is "DDS1764.". ftp> |
At this point you are connected to MVS subsystem, if you issue a DIR you can see your MVS datasets, issue SITE FILETYPE=JES to get connected to JESPLEX
ftp> quote site filetype=jes 200 SITE command was accepted |
Issue a DIR command to see the jobs.
Unlike SDSF, the dir command display the last ran job, first in the list
ftp> dir 200 Port request OK. 125 List started OK for JESJOBNAME=DDS1764*, JESSTATUS=ALL and JESOWNER=DDS JOBNAME JOBID OWNER STATUS CLASS DDS1764J JOB01982 DDS1764 OUTPUT A RC=0000 6 spool files DDS1764J JOB01683 DDS1764 OUTPUT A RC=0000 6 spool files DDS1764J JOB01682 DDS1764 OUTPUT A RC=0016 6 spool files DDS1764J JOB01681 DDS1764 OUTPUT A RC=0016 6 spool files DDS1764J JOB01680 DDS1764 OUTPUT A RC=0016 6 spool files DDS1764J JOB01678 DDS1764 OUTPUT A RC=0016 6 spool files DDS1764J JOB01676 DDS1764 OUTPUT A RC=0016 6 spool files DDS1764J JOB01675 DDS1764 OUTPUT A RC=0016 6 spool files DDS1764J JOB01673 DDS1764 OUTPUT A RC=0016 4 spool files DDS1764J JOB01672 DDS1764 OUTPUT A RC=0016 4 spool files DDS1764J JOB01667 DDS1764 OUTPUT A RC=0016 5 spool files DDS1764J JOB01665 DDS1764 OUTPUT A RC=0012 4 spool files DDS1764J JOB01662 DDS1764 OUTPUT A (JCL error) 3 spool files DDS1764C JOB00417 DDS1764 OUTPUT A RC=0000 6 spool files DDS17641 JOB00414 DDS1764 OUTPUT A RC=0012 4 spool files DDS1764E JOB05786 DDS1764 OUTPUT A RC=0000 4 spool files DDS17641 JOB04559 DDS1764 OUTPUT A RC=0000 5 spool files DDS17641 JOB04557 DDS1764 OUTPUT A RC=0012 4 spool files DDS17641 JOB04555 DDS1764 OUTPUT A RC=0012 4 spool files DDS17641 JOB04498 DDS1764 OUTPUT A RC=0012 4 spool files DDS1764 TSU01992 DDS1764 ACTIVE TSU 250 List completed successfully. ftp: 1430 bytes received in 0.70Seconds 2.03Kbytes/sec. ftp> |
Issue DIR JOBID to see the files associated with the JOB
ftp> dir JOB01982 200 Port request OK. 125 List started OK for JESJOBNAME=DDS1764*, JESSTATUS=ALL and JESOWNER=DDS1764 JOBNAME JOBID OWNER STATUS CLASS DDS1764J JOB01982 DDS1764 OUTPUT A RC=0000 -------- ID STEPNAME PROCSTEP C DDNAME BYTE-COUNT 001 JES2 A JESMSGLG 1137 002 JES2 A JESJCL 425 003 JES2 A JESYSMSG 4303 004 STP010 A SYSOUT 2645 005 STP010 A JNF1JMSG 2746 006 STP010 A JNF2JMSG 2746 6 spool files 250 List completed successfully. ftp: 500 bytes received in 0.00Seconds 166.67Kbytes/sec. |
Issue GET JOBID.n “destination_file” to ftp the job files from Mainframe to your machine. If you issue GET JOBID.n (n is a number) you will get the nth file from JOB, if it is GET JOBID.X you will get all the files belongs to that JOB
ftp> get JOB01982.x "C:\temp1\JOB01982.x.txt" 200 Port request OK. 125 Sending all spool files for requested Jobid 250 Transfer completed successfully. ftp: 22154 bytes received in 1.53Seconds 14.47Kbytes/sec. ftp> get JOB01982.1 "C:\temp1\JOB01982.1.txt" 200 Port request OK. 125 Sending data set DDS1764.DDS1764J.JOB01982.D0000002.JESMSGLG 250 Transfer completed successfully. ftp: 1312 bytes received in 0.00Seconds 1312.00Kbytes/sec. ftp> |
Issue PUT “JCLL_location” (JCLL_location is the JCL file path in your local machine). Eg. in my Machine the JCL is located at “C:\temp1\sort_jcl.txt”
ftp> put "C:\temp1\sort_jcl.txt" 200 Port request OK. 125 Sending Job to JES internal reader FIXrecfm 80 250-It is known to JES as JOB02315 250 Transfer completed successfully. ftp: 754 bytes sent in 0.37Seconds 2.02Kbytes/sec. ftp>
|
Issue DIR to see the latest JOB
250 Transfer completed successfully. ftp: 754 bytes sent in 0.37Seconds 2.02Kbytes/sec. ftp> dir 200 Port request OK. 125 List started OK for JESJOBNAME=DDS1764*, JESSTATUS=ALL and JESOWNER=DDS1764 JOBNAME JOBID OWNER STATUS CLASS DDS1764J JOB02315 DDS1764 OUTPUT A RC=0000 6 spool files DDS1764J JOB01982 DDS1764 OUTPUT A RC=0000 6 spool files DDS1764J JOB01683 DDS1764 OUTPUT A RC=0000 6 spool files DDS1764J JOB01682 DDS1764 OUTPUT A RC=0016 6 spool files DDS1764J JOB01681 DDS1764 OUTPUT A RC=0016 6 spool files |
Guys try this yourself, if this post helped you, don’t forget to Comment/like/share the page and of course visit the below advertisement.
Cheers- Shibu Thannikkunnath
No comments:
Post a Comment