Why don't you just put in a 'DIR' type file, or a number of DIR types if there 
will be a lot of files in there?

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Dave Davis
Sent: Tuesday, August 21, 2007 12:59 PM
To: [email protected]
Subject: RE: [U2] Binary data corruption on copy


That "$" trick is probably specific to pi/open.

I normally convert this kind of file to hex before storing in unidata.

If there's a better way, I would like to know about it. 

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Oaks, Harold
Sent: Tuesday, August 21, 2007 1:10 PM
To: [email protected]
Subject: [U2] Binary data corruption on copy

A question for the group:

I have JPG format records which I wish to copy from unix level into a
Universe file but am having trouble with it getting 'corrupted' during
the copy.  We are converting from pi/open to universe.

I can do this business in pi/open by changing the name of the source
file, prepending it with a $, then copying at TCL level into the pi/open
file.  For example, if the record at unix level is named 1234.jpg and is
in the directory SOURCE I run this command at unix level:
mv 1234.jpg \$1234.jpg
which changes the name.  Now at TCL level in pi/open I can issue the
command COPY FROM SOURCE TO IMAGE_FILE $1234.jpg After that, I can
change the name back within the pi/open file:
CNAME IMAGE_FILE $1234.jpg 1234.jpg
and the copy is complete.

Pi/open knows that if the record name starts with a dollar sign that it
is binary and should not be changed.  Once the copy from a unix
directory into the pi/open dynamic file is done I can use it
successfully.

In Universe I attempt to do the same thing.  The 1234.jpg name is
changed to $1234.jpg and then copied into the Universe file
UNIV_IMAGE_FILE, a dynamic (type 30) file.
But it doesn't work very well - the image is corrupted, the binary file
was messed with during the copy.

I know the jpg record is intact before I start the copying.  I wouldn't
need to bother with a copy to a Universe file, in fact, except that we
have over 130,000 images now and I can't believe a unix directory could
successfully handle that many records.

Any suggestions on copying so that the binary remains intact?

Thanks-
Harold


Harold D. Oaks
Sr. Analyst/Programmer
Office of the Budget and Information Systems Clark County, Washington
ph: (360) 397-6121 x4132
fax: (360) 397-2342
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to