Operating System - HP-UX
1825008 Members
2739 Online
109678 Solutions
New Discussion юеВ

Copy Mainframe file to HPUX format

 
ashanabey
Advisor

Copy Mainframe file to HPUX format

Hi ,

I have ftp the file form MF to HPUX box and trying to copy Mainframe file 'IN.DEAD' to hpux format.

Pleas let me how to do it. When I give ls -l IN.DEAD it come out file not found.

Thx
Ashan




legend the heart and lend the hand
15 REPLIES 15
OldSchool
Honored Contributor

Re: Copy Mainframe file to HPUX format

if you don't see it in the directory you were working in, then you either didn't get it transferred or you put it someplace else.

on the hpux box, you should be able to find it w/

cd /
find . -name IN.DEAD

it'll take a while.

next question is: What do you mean by "hpux format"? is the original data text or binary?
David Bellamy
Respected Contributor

Re: Copy Mainframe file to HPUX format

ashanabey the easy way to do this is when you ftp the file bring it down as ascii.
TwoProc
Honored Contributor

Re: Copy Mainframe file to HPUX format

The "dd" command has conversion from EEBCDIC to ASCII (when you say MF, I'm assuming an IBM variant, but more info would be helpful).

check the manuals for "dd"

> man dd
We are the people our parents warned us about --Jimmy Buffett
Ian P Smith
Advisor

Re: Copy Mainframe file to HPUX format

When you say HPUX format do you mean ascii? If so try:

dd if=IN.DEAD cbs=220 conv=ascii of=in.dead.ascii

This usually works for me.
Steven Schweda
Honored Contributor

Re: Copy Mainframe file to HPUX format

> I have ftp the file form MF to HPUX box [...]

How? Which system was the client and which
was the server? Most FTP clients tell you
the name of the file at each end when they
move one. It might help if you showed
exactly what you did instead of making us
guess.
ashanabey
Advisor

Re: Copy Mainframe file to HPUX format

HP is the client, the problem I am facing cant list the file.

I mean HP form is ASCII.

File in the folder like below.

/inbox/'IN.DEAD'

ls -l IN.DEAD

Massage come out file not found

So I cant use find command.

Any good idea

Thx!
Ashan
legend the heart and lend the hand
Steven Schweda
Honored Contributor

Re: Copy Mainframe file to HPUX format

> It might help if you showed
> exactly what you did instead of making us
> guess.

Here, this means showing a transcript of the
FTP session.

> File in the folder like below.
> /inbox/'IN.DEAD'

You seem to have gotten the apostrophes into
the file name. Perhaps something like this
would straighten things out:

mv *IN.DEAD* IN.DEAD

It might help to avoid using apostrophes in
your FTP commands (which we still haven't
seen).
ashanabey
Advisor

Re: Copy Mainframe file to HPUX format

#ll -l
Hi Steven,
below this the screen out..1st I am try to list the file but it cant find.

Thx!
Ashan


-rw-r--r-- 1 root sys 3105702 Oct 26 09:33 'IN.DEADIN.CONVERT'
-rwxr-xr-x 1 root sys 241 Aug 16 09:14 aa.sh

IN* not found
bepdr4:/ashan # ll -al IN*DEAD*CONVERT*
IN*DEAD*CONVERT* not found
bepdr4:/ashan # ll -al 'IN*DEAD*CONVERT*'
IN*DEAD*CONVERT* not found
bepdr4:/ashan # ll -l 'IN*DEAD*CONVERT*'
IN*DEAD*CONVERT* not found
bepdr4:/ashan #

legend the heart and lend the hand
Steven E. Protter
Exalted Contributor

Re: Copy Mainframe file to HPUX format

Shalom,

I didn't realize HP-UX had a format.

HP-UX uses ascii,not ebsidic(forgive my transliteration) and has two basic choices on file transfer, binary/ascii. Determine the file type and try a ftp or sftp client for the mainframe and see how it goes.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
OldSchool
Honored Contributor

Re: Copy Mainframe file to HPUX format

"HP is the client, the problem I am facing cant list the file.

I mean HP form is ASCII.

File in the folder like below.

/inbox/'IN.DEAD'

ls -l IN.DEAD"
================================
NOTE: 'IN.DEAD' is not the same as IN.DEAD.

You've got quotes some places and not in others. You don't need the quoutes, so take a look at the transfer script again to see why the are there


ashanabey
Advisor

Re: Copy Mainframe file to HPUX format

Hi All,

Thanks for the help.

I manager to fix my problem by doing below

be4:/ashan # ls -l|awk '{print $9}'|grep 'IN*' |while read a
> do
> mv $a in.dead.convert
> done

bepdr4:/ashan # ls -l

-rw-r--r-- 1 root sys 3105702 Oct 26 09:33 in.dead.convert

Its works now!

Thx!

Ashan
legend the heart and lend the hand
Steven Schweda
Honored Contributor

Re: Copy Mainframe file to HPUX format

> > It might help if you showed
> > exactly what you did instead of making us
> > guess.

> Here, this means showing a transcript of the
> FTP session.

> below this the screen out..

That's not the FTP session, is it?

> I manager to fix my problem by doing below

There are many ways to rename a file. You
have found one of the more difficult ones.

If we could see your FTP session, it would
probably be possible to show you how to do
this the easy way. Normally, the FTP GET
command lets you specify the remote file name
_and_ a local file name, which can be
anything you wish. This is particularly
useful when working with two operating/file
systems where file names are much different.
ashanabey
Advisor

Re: Copy Mainframe file to HPUX format

Thanks for help.

After rename the file I have convert IN.DEAD to ebcdic format MVS.

I use below dd command

dd if=deadin.convert.txt conv=ebcdic of=DEADIN.CONVERT

I have attached the source file and output file also.

I am getting garbage characters what is best way to convert to ebcdic.

thx!
Ashan
legend the heart and lend the hand
Steven Schweda
Honored Contributor

Re: Copy Mainframe file to HPUX format

> [...] I have convert IN.DEAD to ebcdic [...]

_To_ EBCDIC? Wasn't it _already_ EBCDIC on
the "Mainframe" system? What did you do, an
ASCII FTP transfer? (Of course, if you had
showed us your FTP session transcript, I
wouldn't need to ask this.) If you don't
want the EBCDIC-to-ASCII conversion, you
might try a binary (Image) FTP transfer.

> what is best way to convert to ebcdic.

The _best_ way is not to convert EBCDIC to
ASCII in the first place.
Ian P Smith
Advisor

Re: Copy Mainframe file to HPUX format

I convert ebcdic to ascii all the time. Use the dd command I previously posted.