The next zOS update (Version 2 release 1) is coming in 2013 September. There are many new cool features added to zOS 2.1. The new zOS requires IBM System z9 or higher hardware to run.
Read more about zOS 2.1 at IBM page.
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
You can do this by find the “TCPIP” job in your spool.
Open the command prompt/Shell and Enter FTP.
Enter Open your mainframe_host_ip
Enter your user ID followed by password
|
C:\>ftp Connected to demomvs.demopkg.ibm.com. |
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 |
Issue a DIR command to see the jobs.
Unlike SDSF, the dir command display the last ran job, first in the list
|
ftp> dir |
Issue DIR JOBID to see the files associated with the JOB
|
ftp> dir JOB01982 |
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” |
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” |
Issue DIR to see the latest JOB
|
250 Transfer completed successfully. |
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
Step 1. Download 3270 client for MAC OSX
Download tn3270 from here – http://www.brown.edu/cis/tn3270/index.html#latest . When I’m writing this article the latest version of tn3270 is 3.3b6 (beta). It worked perfectly in my 2012(mid) Macbook pro Retina display.
Step 2. Mount the dmg and open the disk in finder.
Step 3. Copy tn3270x Application file to your applications folder
Step 4. Invoke tn3270x by double clicking on the application
Fill your hostname on “Host Name” field. By default the port will be 23, but if you want you can change the port number by clicking on “Special” Button
Once you are done with your settings, click on “open connection” Button.
I have used Fandezhi/efglobe mainframe, it is a free mainframe and can be used for your skills development. If you want to know more about creating an id, visit my post about getting a free mainframe id (http://mainframegeek.me/2012/11/23/free-mainframe-id-to-practice/)
That’s it; you know how to go from here J Hey guys, if this post helped you, subscribe for my posts, share it or like my Facebook page.
Cheers –Shibu-
Have you ever wondered about the 18digits maximum limit of Numerical variable declaration (PIC 9(18) ) in Cobol?
Well you can override it in Enterprise Cool, or in other words if Language environment (a.k.a LE) is available at your shop. The Language environment is introduced back in 2000 by IBM, which is a common application layer for many Programming languages. The LE has a lot of cool features which I’ll be covering future posts. So keep coming back.
Here is a sample program for Numeric field declaration with more than 18 digits. The Compiler directive (CBL) is that really turning the ship around.
This compiler-directing statement selectively suppresses output or causes output to be produced. The keywords *CONTROL and *CBL are synonymous.
The Program logic is simple its just move a 31 digit number to the number 1 variable, then add it with itself and display it.
If you Don’t have mainframe access to try it out, visit my post on getting a free mainframe id, it really helps. http://mainframegeek.me/2012/11/23/free-mainframe-id-to-practice/ . It’s a raw mainframe so you won’t be getting handy compile JCL on this mainframe, let me know if you need one, I can help you.
| CBL ARITH(EXTEND) IDENTIFICATION DIVISION. PROGRAM-ID. COB18DIG. AUTHOR. SHIBU.T. * DATA DIVISION. WORKING-STORAGE SECTION. 77 WS-NUM1 PIC 9(31). * PROCEDURE DIVISION. A0000100-MAIN-PARA. MOVE 1234567890123456789012345678901 TO WS-NUM1. DISPLAY ‘WS-NUM1 BEFORE ADDITION: ‘ WS-NUM1. ADD WS-NUM1 TO WS-NUM1. DISPLAY ‘WS-NUM1 AFTER ADDITION: ‘ WS-NUM1. STOP RUN.
|
The compile and run JCL will complete with return-code 000, here is the output I got in my machine.
Does my Program, post helped you? Comment, rate or like my facebook page (top right corner of this page) and click on the adds listed below. It really help me to make this website alive.
-Cheers, Shibu
Hey guys here is the Thanks giving gift. I’m not sure how many of you are aware about this.
You can access Fandezhi mainframe system for your Mainframe skills development, there is no hidden charges to use its, yes its completely free.
efglobe/Fandezhi Mainframe is a virtual Mainframe and running on zOS 1.6 ADCD (Application Developers Controlled Distributions). The latest release of zOS is 1.13 but zOs 1.6 is more than enough for practicing. I’m not willing to talk about the virtualization of Mainframe.
**Important
Make sure you will not create some random user ids and run any infinite loop Programs on fandezhi mainframe. Its not monitored and you may be banned from using dezhi mainframe if you do so.
All you need to have to use fandezhi/efglobe mainframe is
Go to efglobe/fandezhi mainframe support site using the below link
http://zos.efglobe.com/cgi-bin/mainframe/mainuser
Click on apply for new TSO ID, you will get the below screen
fill in your desired TSO ID, your name and your email id, then click on submit. After a while you will get an email with the TSO ID/Password and the Mainframe host IP etc.
As you see in the mainframe support site, you can
I personally recommend IBM Personal communications, but it comes with a price tag. You can buy it (its really worth the money and its rich in features). If you prefer cheap/free you can get one of these
Once you download the terminal emulator go ahead and install it.
If you are using IBM Personal communications then click on “Connections>Configure” and click on “link parameters”, then enter the host IP address you received on you email or you can use zos.efglobe.com and port 23.
In addition to this you can configure keyboard and graphics (if you want to use GDDM), since we all will be using different Terminal emulators I’m not going to cover it. Click on ok and connect to the host.
Here is the efglobe/fandezhi TSO Logon Page. You can use TSO, CICS, NETVIEW, NVAS and AOF. IMS will be working in this zOs configuration.
That’s, you know how to go from here. Try it. Let me know if you get any problems while logging in.
As I Promised beginning of this series, here is the third method to transfer files from Mainframe to non Mainframe (Windows) . I have used Windows 7 X64 professional Operating system on my laptop and Internet Information Server 7.5.
You could also read other methods I’ve written about FTP’ing files from IBM Mainframe to Windows. These methods are easy to use and utilizes the free resources available in IBM Mainframe as well as Windows/free wares.
1. Simple FTP with Windows Bat file – http://mainframegeek.me/2012/11/20/setup-ftp-from-mainframe-to-non-mainframe-method-ii-using-bat-file/
2. Setup FTP with Filezilla server.
3. Setup FTP with IIS (Internet Information Service) FTP server.
http://http://mainframegeek.me/2012/11/23/setup-ftp-from-mainframe-to-non-mainframe-method-iii/
By default Windows comes with Internet Information services. You just need to turn them on.
Navigate to Control Panel>Programs and features/Add or remove programs, and click on Turn windows features on or off. It will take a while to turn on the service.
Navigate to Control Panel>Administrative tools and open Internet Information services
Right click on the FTP area and select View sites,
Now right click on the workspace and select add FTP site
Enter a FTP site name and choose directory where you want your incoming (From Mainframe) files stored to.
Click on next, select an IP Address (Copy to a text file for using in JCL) make sure you selected No SSL (you won’t be able to transfer files otherwise) and click on next. remember I said in the first method, FTP always uses port 21, so leave it as it is.
Click on Next and Enable anonymous authentication (or you can use a user id and password) and hit finish
On the sites window, right click the FTP site you just created and select Basic Settings
Click on connect as , then select specific user and click on set and enter your windows user id and password
Hit Ok for all the dialog boxes and go back to mainframe and edit your JCL as below
Copy paste the below JCL to your ISPF editor, make the changes as I mentioned below·
Complete JCL
|
//DDS1764J JOB NOTIFY=DDS1764 |
Now Submit the JCL (it will complete with MAXCC 000). Due to security issues (I don’t want some spammer to submit random FTP jobs to my PC
) I have blurred my ip address.
Then check your shared folder (On your PC) for received file. Did you forget your shared folder? refer back to step 2 to see the folder.
and That’s it now you are familiar with the 3 FTP methods which I know, FTP with IIS as well as Filezilla are same in a way, just the server software on the windows system is changing.
Try these three methods, let me know if you know any other methods (leave a comment on this page or email me @ shibubalakrishnan@live.com).
If this tutorial helped you, please share the page on facebook, like it and please support me by clicking on the below ads.
Here is another method with which you can transfer files from Mainframe to a windows Machine. To use this method you need to have a .Bat file and a file with list of files need to be transferred and valid Mainframe credentials.
You could also read other methods I’ve written about FTP’ing files from IBM Mainframe to Windows. These methods are easy to use and utilizes the free resources available in IBM Mainframe as well as Windows/free wares.
1. Simple FTP with Windows Bat file – http://mainframegeek.me/2012/11/20/setup-ftp-from-mainframe-to-non-mainframe-method-ii-using-bat-file/
2. Setup FTP with Filezilla server.
3. Setup FTP with IIS (Internet Information Service) FTP server.
http://http://mainframegeek.me/2012/11/23/setup-ftp-from-mainframe-to-non-mainframe-method-iii/
Copy the contents of below table and save it as script.txt. You can save anywhere you want, I saved it on C:\temp1 folder. Change my_mainframe_userid and my_mainframe_password to your mainframe user id and password. By default the your HLQ (High level qualifier) will be your mainframe id, so whatever DD names you mention in the script file will have HLQ (High level Qualifier) padded, e.g HLQ.DDS1764.PGMG.CBL(ASCEBCB1) ,
To avoid this, we issue cd .. . Update the DD names with your list of data set names, you can either use PDS member names, a PS or Compressed (xmited) PDS or everything. there is no limit for the number of files, but keep in mind that this could eat a lot of bandwidth, followed by the destination file. Save this file as script.txt in your windows machine.
|
my_mainframe_userid |
Copy the contents of below table and save it as batchftp.bat . Before oyu save the file, change my_mainframe_ip to your mainframe host ip for name. when you save the file from Microsoft notepad, make sure you choose file name: batchftp.bat and Save as type: All Files (*.*) .
|
echo off |
Make sure you keep both the script.txt as well as the batchftp.bat file in the same folder. Now double click on the batchftp.bat to start download. Once the script finished you can see all the transferred files in the folder mentioned in script.txt.
Try the script, let me know if you have any questions. If you think this tutorial helped you, don’t forget to like my facebook page, rate or share. and support me by watching the below video (Ad)
-Cheers
Shibu