Solved

sco-unix 5.04 file conversion

Posted on 2000-04-07
6
350 Views
Last Modified: 2013-12-05
I am using sco-unix 5.04, and a program called CIA, a business quote/management program. I need to convert the quote data file from the unix to windows/nt environment. The file is over 11 meg in size, and the program has no export funtion for this procedure. I am new to sco environment, and would appreciate a detailed method of doing this download and conversion.
          Calvinjs
0
Comment
Question by:calvinjs
  • 3
  • 2
6 Comments
 
LVL 2

Expert Comment

by:frederico
ID: 2696792
Although you have told us the name of the manufacturerof the program you are using,, you failed to tell us to what program/database/filesystem type you intende to convert to.
It would also help to know the language/filesystem used by "CIA".
Once we have these details, we may be able to help you.

Regardless of that, and if the unix you are using is NOT the host system, then you can connect through FTP from one workstation in windows, to the Unix server, and download the file.
0
 
LVL 20

Expert Comment

by:tfewster
ID: 2696942
One of the most common problems with moving text files from Unix to Windows is that the usual End Of Line marker in Unix is Linefeed, whereas DOS/Windows expects LineFeed AND Carriage Return.

The SCO unix2dos command will convert the EOL marker (& character sets if required).

Have a look at the file using "more" - if it's text, with the end of record delimited by Linefeed, moving it should be straightforward. If it's binary, or encrypted, you'll need to go back to the supplier for help.

0
 

Author Comment

by:calvinjs
ID: 2697912
frederico & tfewster
 I want to eventually get the file into a dbf, and use NT windows based programs to deal with our quote system. The CIA program will not print to file or export the data in another format. I will check to see what format it is using on monday. The CIA program will print a report in the unix system, is there a way to intercept it, and move it as a text file, even though the program does not give you this option?
             calvinjs
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
LVL 20

Accepted Solution

by:
tfewster earned 200 total points
ID: 2698432
One way of doing this intercept is to set up a new printer and specify the "port" as e.g. /tmp/CIAdata.txt instead of the usual /dev/ttynn.

At the command line, do "touch /tmp/CIAdata.txt" to create the "port". Make sure the "port" is writable by user "lp" but not readable by unauthorised people!

Use the printer interface "standard", so no control codes get written to the file.

When you print to that device, the output will just get written to the text file. You can then run unix2dos on the file and ftp it to windows, to be imported to your database there. Delete the contents of the file with "> /tmp/CIAdata.txt" if you need to run multiple exports.

I expect the main problem will be in developing reports in CIA that output all the data in a "flat file" format. If CIA is a relational database, you'll need one report to export the "master" records, then another for the sub-records (e.g. the components of the quote).
0
 

Author Comment

by:calvinjs
ID: 2698462
tfewster really knows unix, and for me just knew to the environment, he is better and a text book.
           Calvinjs
0
 
LVL 20

Expert Comment

by:tfewster
ID: 2698476
Thanks Calvin!

BTW, I'd be quite happy to continue this "discussion" if you have problems with any of these steps - Just add a comment to this thread.

Cheers, Tim
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now