IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

GZIP counterpart in MVS


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
amu.bits

New User


Joined: 24 Sep 2009
Posts: 8
Location: India

PostPosted: Thu Oct 01, 2009 12:10 pm
Reply with quote

Hi all,

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?

Thanks
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Oct 01, 2009 1:27 pm
Reply with quote

since You are working on USS side, why not use the USS provided GZIP ??
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Oct 01, 2009 4:55 pm
Reply with quote

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.
Back to top
View user's profile Send private message
amu.bits

New User


Joined: 24 Sep 2009
Posts: 8
Location: India

PostPosted: Thu Oct 01, 2009 10:59 pm
Reply with quote

how do I run a USS script? if you can provide an example, that would be great.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Oct 01, 2009 11:32 pm
Reply with quote

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):
Code:
//BPXBATCH EXEC PGM=BPXBATCH,
//         PARM='sh /u/home/abc/x.sh',
//         REGION=8M
//STDIN    DD   DUMMY
//STDOUT   DD   PATH='/u/home/abc/x.out',
//         PATHOPTS=(OWRONLY,OCREAT),
//         PATHMODE=SIRWXU
//STDERR   DD   PATH='/u/home/abc/x.err',
//         PATHOPTS=(OWRONLY,OCREAT),
//         PATHMODE=SIRWXU
Back to top
View user's profile Send private message
amu.bits

New User


Joined: 24 Sep 2009
Posts: 8
Location: India

PostPosted: Tue Oct 06, 2009 7:32 pm
Reply with quote

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

//AK816HG JOB (PIPDEV,0000,0000),'AMU',MSGLEVEL=(1,1),CLASS=3,
// NOTIFY=&SYSUID,MSGCLASS=T
//*
//* GO-STEP INPUT: PGM=...
//*
//GO EXEC PGM=GZIP123,REGION=0M,
// PARM='-a AK816H.FILE1.DSN'
//STEPLIB DD DISP=SHR,DSN=AK816H.LOADMOD
//SYSUDUMP DD SYSOUT=*
//SYSTERM DD SYSOUT=*
//SYSPRINT DD SYSOUT=*

But, I am facing an error
AK816H.FILE1.DSN: EDC5049I THE SPECIFIED FILE NAME COULD NOT BE LOCATED. (errno2=0xC00B0641)

Can anyone pls, who have had earlier hands-on with GZIP123, help me with the error?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Tue Oct 06, 2009 7:58 pm
Reply with quote

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.

Try this:
Code:
//BPXBATCH EXEC PGM=BPXBATCH,
//         PARM='sh gzip -V',
//         REGION=8M
//STDIN    DD   DUMMY
//STDOUT   DD   SYSOUT=*
//STDERR   DD   SYSOUT=*
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.
Back to top
View user's profile Send private message
amu.bits

New User


Joined: 24 Sep 2009
Posts: 8
Location: India

PostPosted: Wed Oct 07, 2009 12:12 pm
Reply with quote

Hi,

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?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Wed Oct 07, 2009 2:48 pm
Reply with quote

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.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts NEAT command counterpart in REXX CLIST & REXX 11
No new posts Does NODETAIL have a counterpart DFSORT/ICETOOL 5
No new posts OVERLAY Counterpart in SYNCSORT JCL & VSAM 6
Search our Forums:

Back to Top