Operating System - HP-UX
1833738 Members
2467 Online
110063 Solutions
New Discussion

Re: Cannot open 2 gig file

 
SOLVED
Go to solution
John Jimenez
Super Advisor

Cannot open 2 gig file

We are having trouble opening a 2 gig file. We can tail it, but not open it. Is there any way to open this file?

=> #ll mthend.dat
-rw-rw-r-- 1 i1017 staff 2167315020 Jun 30 14:01 elig_n60.dat
HOST: /monthend/tmp
=> #pg mthend.dat
mthend.dat: Value too large to be stored in data type
Hustle Makes things happen
7 REPLIES 7
John Jimenez
Super Advisor

Re: Cannot open 2 gig file

whoops it should have read
=> #ll mthend.dat
-rw-rw-r-- 1 i1017 staff 2167315020 Jun 30 14:01 mthend.dat
HOST: /monthend/tmp
=> #pg mthend.dat
mthend.dat: Value too large to be stored in data type

It has large files enabled.

/dev/vg07/lvol7 /monthend vxfs rw,suid,largefiles,delaylog,datainlog 0 2


Hustle Makes things happen
KVK
Valued Contributor

Re: Cannot open 2 gig file

Hi John ,

You must enable the LARGEFILES option for the file system .that u can check by

#fstyp -v /dev/vgXX/lvolX

Still if you have the same problem just try with #cat ==>Eventhough the same error contact your application vendor which it's created the your 2GB file

Since HP-UX the largefiles above 2GB

Cheers

A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Cannot open 2 gig file

A number of utilities still have internal limits eventhough the filesystem itself does not. Frankly, I can't imagine pg'ing or more'ing a 2GB+ file. You should note that utilities like vi, for example, would still have problem because you could be simply hitting maxdsiz (or maxdsiz_64bit if running a 64-bit application). I suspect that pg is a 32-bit application. You might try adding a starting linenumber to pg.
If it ain't broke, I can fix that.
John Jimenez
Super Advisor

Re: Cannot open 2 gig file

Clay,
maxdsiz is = 268435456
maxdsiz_64 is = 1073741824

We have data files that are over 10 gig. But the files that we export at
month end are getting larger and larger and this could be the first file over
2 gig that is in a text file.

CAT works yes. This file needs to open up in a C program. A while back we had a different issue HP mentioned using the fopen instead of open and to use the +DA2.)W compiler option. When we use this it produces a core dump
Hustle Makes things happen
John Jimenez
Super Advisor

Re: Cannot open 2 gig file

That was the 64 bit application (+DA2.0W) compiler option
Hustle Makes things happen
John Jimenez
Super Advisor

Re: Cannot open 2 gig file

Thanks again for the help. Susan at HP prvided us with Document ID WP1100001 and the programmer was able to use the open64 to open it up.
Hustle Makes things happen
John Jimenez
Super Advisor

Re: Cannot open 2 gig file

I am closing this thread now. thanks again
Hustle Makes things happen