I have a requirement in which I need to replicate a UNIX script in MVS. The script earlier used to GZIP a file and transferred the same to client. I need to reproduce the samething in MVS. I know, we can't compress a PS file with existing IBM utilities. but can anyone help me with MVS counterpart to GZIP? PKZIP is not installed in my system. Can GZIP used in the ftp script of MVS?
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
Quote:
Can GZIP used in the ftp script of MVS?
FTP uses commands, not scripts -- so you cannot do a gzip command in an FTP transfer. Either before or after the file is handled by FTP, you can run a Unix System Services script in batch to zip (or unzip) the file using GZIP.
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
You can run IKJEFT01 with an OSHELL command, or use BPXBATCH. Assuming your Unix home directory is /u/home/abc, and you create your script under this directory (call it x.sh):
Hi, I don't have the details of home directory. I just have the FTP site details. While searching in web on GZIP for MVS. I have come across gzip123mvs.zip developed by Harald Denker,an executable for version 1.2.3 which is is in www.gzip.org/gzip123mvs.zip.
Here is the JCL which I have written after installing the load module
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
Quote:
I don't have the details of home directory.
You can use OMVS in TSO, or telnet to your USS port, and once you're signed in you can enter pwd to find your home directory -- since it is the directory you start from when you sign into Unix System Services.
which should produce output on STDERR giving you the version of GZIP installed on your Unix System Services.
I'm not familiar with GZIP123 so I cannot help you with it -- I use the GZIP supplied by IBM as part of Unix System Services ported tools. This is version 1.2.4 according to my system.
I have used TSO OMVS and have entered USS, pwd is '/', I am able to navigate through directories, but when using the following line commands, the errors I am facing are:
$ vi x.sh
FSUM9140 Terminal "dumb" has insufficient capabilities for Curses.
Explanation is
User Response: vi cannot be run from the OMVS shell. vi can only be run
via a "raw-mode" session, such as telnet or rlogin. The value of TERM
should not be changed from the setting assigned by your terminal.
When trying to create dir by mkdir
mkdir: FSUM6404 directory "home": EDC5134I FUNCTION NOT IMPLEMENTED.
To login through telnet, I need USS port details, which I thought would be in /etc/services file, but there were no details about OTELNET.
If 'vi' cannot be used to create a shell script in OMVS, which alternate can be used? Also, how do I find the USS port details?
The code which you have given me to check the version of GZIP has abended with error code.
gzip: FSUM7351 not found
Can aynone pls help me? I need to compress an EBCDIC file into an ASCII one, any compression utility apart from GZIP can really help?
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
vi is not supported on z/OS machines since its method of screen interaction cannot be used with 3270 terminals. ed is the other Unix System Services editor and it does work with 3270 terminals. I use OEDIT which is essentially an ISPF interface. You may also create your shell script under ISPF as an MVS file and OPUT it into Unix System Services.
USS ports are stored in the TCP/IP parameter file, which your site support group set up while establishing the LPAR. It typically is TCPIP.TCPPARMS or SYS1.TCPPARMS, but does not have to be. Your site support people are the only ones who can tell you for sure which port Unix System Services is listening to for telnet commands -- typically 623, 1023, 2023 are used but there's no requirement that it be one of these.
Quote:
I need to compress an EBCDIC file into an ASCII one
This is not compression -- this is conversion. iconv is the Unix System Services command that converts EBCDIC to ASCII and vice-versa.
If the source file was zipped using GZIP, you can contact your site support group about installing gzip from the Ported Tools that IBM makes available, or you can contact your manager and request the expenditure of thousands of dollars to purchase a zip package such as PKZIP, ZIP-390, INFOZIP -- which again will have to be installed by your site support group. Or you can request the original file not be zipped when you get it.