Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...This is easily the most helpful website I've ever used, and this is the best forum with the quickest response time bar none...."

Geography

Where in the world do Tek-Tips members come from?
EMax1 (MIS)
9 Nov 05 23:12
Following my previous message.
Is there a command that will export a data file to a *.csv formated file, or other ascii file?
teknb (IS/IT--Management)
10 Nov 05 18:33
If it is RMS index sequential Files have you looked into CONVERT?

(HELP CONVERT),

To make a clean FDL just do an ANALYZE/FDL from f.e. your LOGIN.COM file. And try to convert the "database" to
ascii.

There might be a problem if the file contains binary data (numbers, dates etc.not converted to ascii strings.)

In that case make a simple program (Fortran, C, Cobol) or even DCL within some limits and convert the record you read to any format you want f.e. CSV file.

kind regards,

Nico Baggus

EMax1 (MIS)
10 Nov 05 23:32
Well,
The best I got was:
I entered the command:
convert/document zza.dat-zza1.txt/format=text
and it asked me for the output, to which I answered again zza1.txt

After this I got the following message:
%DCL-W-ACTIMAGE, error activating image CDA$CONVERT
-CLI-E-IMAGEFNF, image file not foundNODE1$DKBo:[SYS0.SYSCOMMON.][SYSEXE]CDA$C;

I guess something is not set right to convert on this machine.

Whwn you say, a small; progarm, is there a structure to the data file? Structure that is fixed(I doubt) or structure I could find somewhere.

As you see I am not a big VMS specialist, I just try to convert the data to a database that is more familiar to me.
Thanks for any help.
Louis
teknb (IS/IT--Management)
11 Nov 05 3:18
Convert/DOCUMENT is not what you are looking for (Wordperfect -> WPS+ and back, after buying the conversion tools).

You want to look in to convert/FDL.

To be able to use that you should be able to just type the file to your screen and it should still be readbale.
(If it contain binary stuff, disconnect your session and start a new one. You will then also know that the file contains binary data.

Regarding the data file: You just say file/database
Almost any file can contain whatever data, you information is not sufficient.

I have no idea what is in it whatsoever.
.DAT is generic for just data. And all datafiles have some kind of structure, the only thing you need to know is what that structure is... Is the software that manages it still available? Is there documentation?

kind regards,

Nico Baggus

PaulTEG (TechnicalUser)
11 Nov 05 4:16
Louis,

specify your converted dat file to be a name other than the original.

$ help analyze
$ help convert

HTH
--Paul

Spend an hour a week on CPAN, helps cure all known programming ailments

EMax1 (MIS)
11 Nov 05 10:42
The files I try to convert are all data file that have information for Customers (Name addresses, etc) or item descrioptions. There is no pictures or other.
I did what you said and type 'type....' to view the file. It shows ASCII characteres and text I can read, but get lost if any non ascii character shows.

Otherwiase, I have full access to the software and data, since this system is currently in use. I am just preparing an other database to populate with the current data.

I need to read a lot more, but fort example i need to convert the file CUST.DAT (taht include some non ascii fields) to CUST.TXT (where I would like to have all in ASCII) Since I know the data entered, I do not see why these files should have any non ASCII characters in it. I meen images or such.
teknb (IS/IT--Management)
11 Nov 05 11:59
Well,

Numbers f.e. might be stored as binary data,
a 1 would probably take 2 or 4 bytes and be stored as
a "01 00" or "01 00 00 00" sequence.

You also might do the following:

DUMP/RECORD=COUNT=1 CUST.DAT

And compare the data you see with the first record on your file.

If there are interger fields up to 4 bytes
and the records are no longer than about 950 bytes
and the dates are strings and not binary values
(microseconds since 17 Nov 1785, (VMS base time)
 seconds since 1 jan 1970 (Unix/C runtime library base)
 Days since 1900 + separate time field (many databases))
than a relatively simple DCL procedure can be used to export your data.

Otherwise you will need a more elaborate program to convert you binary values into ascii.

kind regards,

Nico Baggus

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close