Unix Data files vs DOS data files 
Author Message
 Unix Data files vs DOS data files

Help!
I have taken my Unix Microfocus Cobol programs and have them running
successfully under Windows 95 MF Cobol.  However, when I copy my data
files from Unix to Windows 95, I can't read them.

Can someone educate me on the differences between the data file formats
and suggest a really easy way to just copy my data?

Grovelling in appreciation!
Jim



Mon, 07 Jun 1999 03:00:00 GMT  
 Unix Data files vs DOS data files


Quote:
>Help!
>I have taken my Unix Microfocus Cobol programs and have them running
>successfully under Windows 95 MF Cobol.  However, when I copy my data
>files from Unix to Windows 95, I can't read them.

>Can someone educate me on the differences between the data file formats
>and suggest a really easy way to just copy my data?

Don't know that this is your problem, but if these are ASCII data files,
they you may need to run the UNIX data files through the UNIX tr command to
translate UNIX's end-of-line delimiter (newline) to DOS's end-of-line
delimiter (newline/carriage-return).
--



Mon, 07 Jun 1999 03:00:00 GMT  
 Unix Data files vs DOS data files

Quote:


> >Help!
> >I have taken my Unix Microfocus Cobol programs and have them running
> >successfully under Windows 95 MF Cobol.  However, when I copy my data
> >files from Unix to Windows 95, I can't read them.

> >Can someone educate me on the differences between the data file formats
> >and suggest a really easy way to just copy my data?

> Don't know that this is your problem, but if these are ASCII data files,
> they you may need to run the UNIX data files through the UNIX tr command to
> translate UNIX's end-of-line delimiter (newline) to DOS's end-of-line
> delimiter (newline/carriage-return).
> --


On at least hp-ux tr will only substiture an equal number of characters,
not one
character for two.  There are usually commands to do this, though.  ON
SCO, I think
it is dos2unix (may be wrong on that).  I know on hp, it is dos2ux.

Regards,

Tony Heffner



Mon, 07 Jun 1999 03:00:00 GMT  
 Unix Data files vs DOS data files

We transfer files from SunOS to Windows95 to run on MF Cobol programs
all the time.   When I'm on the SUN I run  gunzip to do a UNIX unzip
of the selected file (example gunzip whatever.dat.gz), then run  
zip -l whatever.zip whatever.dat while on UNIX.  Then transfer the
files over to my WIN95 machine (the -l is critical).  hope this helps.



Quote:


>> >Help!
>> >I have taken my Unix Microfocus Cobol programs and have them running
>> >successfully under Windows 95 MF Cobol.  However, when I copy my data
>> >files from Unix to Windows 95, I can't read them.

>> >Can someone educate me on the differences between the data file formats
>> >and suggest a really easy way to just copy my data?

>> Don't know that this is your problem, but if these are ASCII data files,
>> they you may need to run the UNIX data files through the UNIX tr command to
>> translate UNIX's end-of-line delimiter (newline) to DOS's end-of-line
>> delimiter (newline/carriage-return).
>> --

>On at least hp-ux tr will only substiture an equal number of characters,
>not one
>character for two.  There are usually commands to do this, though.  ON
>SCO, I think
>it is dos2unix (may be wrong on that).  I know on hp, it is dos2ux.

>Regards,

>Tony Heffner



Mon, 07 Jun 1999 03:00:00 GMT  
 Unix Data files vs DOS data files


writes:

Quote:

(Byronics Pty Ltd)
>writes:
>>Help!
>>I have taken my Unix Microfocus Cobol programs and have them running
>>successfully under Windows 95 MF Cobol.  However, when I copy my data
>>files from Unix to Windows 95, I can't read them.

>>Can someone educate me on the differences between the data file formats
>>and suggest a really easy way to just copy my data?

>Don't know that this is your problem, but if these are ASCII data files,
>they you may need to run the UNIX data files through the UNIX tr command to
>translate UNIX's end-of-line delimiter (newline) to DOS's end-of-line
>delimiter (newline/carriage-return).

If you have PFE 0.06.002 (Programmer's File Editor) installed on the
Windows box, it can read/write both Unix and DOS formats.  It's a nice
editor and is completely free (always a nice bonus).  

Troy Smith



Tue, 08 Jun 1999 03:00:00 GMT  
 Unix Data files vs DOS data files

Quote:

> Help!
> I have taken my Unix Microfocus Cobol programs and have them running
> successfully under Windows 95 MF Cobol.  However, when I copy my data
> files from Unix to Windows 95, I can't read them.

> Can someone educate me on the differences between the data file formats
> and suggest a really easy way to just copy my data?

> Grovelling in appreciation!
> Jim

oh, something else.  At least on HP-UX, there is a file named file.1
that contains the information about the different file types and how
data is stored internally for the UNIX platform.  on hp-ux, it's either
/usr/lib/cobol/docs/file.1 or /opt/cobol/cobdir/docs/file.1

Regards,

Tony Heffner



Tue, 08 Jun 1999 03:00:00 GMT  
 Unix Data files vs DOS data files

Quote:



> > >Help!
> > >I have taken my Unix Microfocus Cobol programs and have them running
> > >successfully under Windows 95 MF Cobol.  However, when I copy my data
> > >files from Unix to Windows 95, I can't read them.

> > >Can someone educate me on the differences between the data file formats
> > >and suggest a really easy way to just copy my data?

> > Don't know that this is your problem, but if these are ASCII data files,
> > they you may need to run the UNIX data files through the UNIX tr command to
> > translate UNIX's end-of-line delimiter (newline) to DOS's end-of-line
> > delimiter (newline/carriage-return).
> > --

> On at least hp-ux tr will only substiture an equal number of characters,
> not one
> character for two.  There are usually commands to do this, though.  ON
> SCO, I think
> it is dos2unix (may be wrong on that).  I know on hp, it is dos2ux.

> Regards,

> Tony Heffner

I don't have the manual here, but *believe* SCO unix is dtox (dos to
unix).

--
****************************************************************************

url    : http://www.epix.net/~prgsdw
****************************************************************************



Tue, 15 Jun 1999 03:00:00 GMT  
 Unix Data files vs DOS data files

Quote:




>> > >Help!
>> > >I have taken my Unix Microfocus Cobol programs and have them running
>> > >successfully under Windows 95 MF Cobol.  However, when I copy my data
>> > >files from Unix to Windows 95, I can't read them.

>> > >Can someone educate me on the differences between the data file formats
>> > >and suggest a really easy way to just copy my data?

>> > Don't know that this is your problem, but if these are ASCII data files,
>> > they you may need to run the UNIX data files through the UNIX tr command to
>> > translate UNIX's end-of-line delimiter (newline) to DOS's end-of-line
>> > delimiter (newline/carriage-return).
>> > --

>> On at least hp-ux tr will only substiture an equal number of characters,
>> not one
>> character for two.  There are usually commands to do this, though.  ON
>> SCO, I think
>> it is dos2unix (may be wrong on that).  I know on hp, it is dos2ux.

>> Regards,

>> Tony Heffner

>I don't have the manual here, but *believe* SCO unix is dtox (dos to
>unix).

In the past I had to go the other way, from DOS to AIX, and had to
extract the indexed files to LINE SEQUENTIAL files, move them to
AIX (with CR/LF to NL conversion), and then read them back into
INDEXED files.

COBOL holds the .DAT portion of a file slightly differently
(header blocks & end of record markers) and I also believe that the
.IDX part is different.

If there aren't too many files, it's a fairly simple. It just needs
2 read all records and write them programs.

All the best,

Brian

-----------------------------------------------------------
Brian W Spoor MBCS
Chartered Information Systems Practitioner
Friday Computer Software          Phone: +44-(0)1803 852625

-----------------------------------------------------------



Wed, 16 Jun 1999 03:00:00 GMT  
 Unix Data files vs DOS data files


Quote:

> COBOL holds the .DAT portion of a file slightly differently
> (header blocks & end of record markers) and I also believe that the
> .IDX part is different.

In older MF systems there is a switch set by the CALL "91" service
where function 52 tells the system to use 2 byte record terminators
for line sequential and relative files under Unix.

This may save a step or two.  With Level II format ISAM files the
data part is a simple relative file so with this switch and a
'file rebuild' program it should be possible to move DOS data files
over to Unix.

Coming back the other way it may be too late as the files will already
be 1 byte terminated.

Quote:

> If there aren't too many files, it's a fairly simple. It just needs
> 2 read all records and write them programs.

Remembering that LINE SEQUENTIAL files cannot have binary data in
them so field moves to DISPLAY data is required for COMP-x fields.


Wed, 16 Jun 1999 03:00:00 GMT  
 
 [ 9 post ] 

 Relevant Pages 

1. Can REALBASIC read and write UNIX/DOS data files

2. data file extensions differ on Unix and DOS

3. Read VFP data files into Clipper data files

4. I have 100 data files, I want to join them together as one data file

5. non-gridded ASCII data file to netCDF data file

6. Ms SQL fileerror 22001=String data, right truncation when I fill data into file

7. Reading a data file from a very remote data

8. Using file data transparently as internal data?

9. help reading negative values in data file - test code and test data

10. How to recup data with Access or Excel from Cobol Data with *.ISM and *.IDX file

11. Extracting data from COBOL data files

12. distutils, data files, and data sources

 

 
Powered by phpBB® Forum Software