dbTalk Databases Forums  

Best Way to Build Large Item to Share with Windows World

comp.databases.pick comp.databases.pick


Discuss Best Way to Build Large Item to Share with Windows World in the comp.databases.pick forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Robert S. Lobel
 
Posts: n/a

Default Best Way to Build Large Item to Share with Windows World - 08-31-2005 , 10:35 PM






Dear Group,

I am looking for advise on producing a 25 megabyte item (with 25k
attributes/lines of 1k characters each) that will be shared with the Windows
world. Are d3 print files a good idea, or should I consider building a
large dimensioned array with flashbasic? I would appreciate your opinion.

Rob



Reply With Quote
  #2  
Old   
Tony Gravagno
 
Posts: n/a

Default Re: Best Way to Build Large Item to Share with Windows World - 09-01-2005 , 02:50 AM






Joseba posted an excellent solution to this in the RD forum just
within the last couple days.

T


"Robert S. Lobel" wrote:

Quote:
Dear Group,

I am looking for advise on producing a 25 megabyte item (with 25k
attributes/lines of 1k characters each) that will be shared with the Windows
world. Are d3 print files a good idea, or should I consider building a
large dimensioned array with flashbasic? I would appreciate your opinion.

Rob



Reply With Quote
  #3  
Old   
symeonb@gmail.com
 
Posts: n/a

Default Re: Best Way to Build Large Item to Share with Windows World - 09-01-2005 , 07:47 AM



Dont know about D3 but on U2 I would probably use openseq/writeseq to
read/write large os files.


Reply With Quote
  #4  
Old   
Luke Webber
 
Posts: n/a

Default Re: Best Way to Build Large Item to Share with Windows World - 09-01-2005 , 08:13 AM



symeonb (AT) gmail (DOT) com wrote:
Quote:
Dont know about D3 but on U2 I would probably use openseq/writeseq to
read/write large os files.
On D3, the equivalent is %open, %write and %close. But on D3/NT you have
to use Flash compilation [eg COMPILE file item (O].

Luke


Reply With Quote
  #5  
Old   
(latimerp)
 
Posts: n/a

Default Re: Best Way to Build Large Item to Share with Windows World - 09-01-2005 , 01:36 PM



Robert S. Lobel wrote:
Quote:
Dear Group,

I am looking for advise on producing a 25 megabyte item (with 25k
attributes/lines of 1k characters each) that will be shared with the Windows
world. Are d3 print files a good idea, or should I consider building a
large dimensioned array with flashbasic? I would appreciate your opinion.

Rob


The spooler is a great way to build a large text item. The TERM
statement for Printer width should support at least 2k. To avoid
page breaks set printer page depth to 0. Then just copy it to a
Qpointer to as O/S directory and FTP it across. It should be darn
easy test and very fast. If you need a delimiter look at LISTTAB.

Patrick, <;=)


Reply With Quote
  #6  
Old   
Kevin Powick
 
Posts: n/a

Default Re: Best Way to Build Large Item to Share with Windows World - 09-01-2005 , 02:46 PM



Robert S. Lobel wrote:

Quote:
I am looking for advise on producing a 25 megabyte item (with 25k
attributes/lines of 1k characters each) that will be shared with the
Windows world. Are d3 print files a good idea, or should I consider
building a large dimensioned array with flashbasic?
Set-up a super q-pointer for the OSFI and simply COPY your D3 item
there. The result will be CR/LF delimited text file, 25K lines long.

MD Entry called MyDosFiles
Points to a folder called MyFolder on the C: drive

MyDosFiles
001 Q
002
003 DOS:C:/MyFolder/

Use copy command to copy your item

COPY MyD3FILE MyBigItem
TOMyDosFiles

You could also use a BASIC program

open '','MyDosFiles' to DOS.FL else print 'err1';stop
.....
.....
write item on DOS.FL, 'ItemName'


--
Kevin Powick


Reply With Quote
  #7  
Old   
jra
 
Posts: n/a

Default Re: Best Way to Build Large Item to Share with Windows World - 09-01-2005 , 03:37 PM



In D3/Windows


include dm,bp,unix.h fcntl.h
open "dos:c:/" to cfile
open "file" to workfile
bf=""
write bf on cfile,"dosfile"
close cfile
fd=%open("c:/dosfile",O$RDWR)
select workfile
wtext=""
loop
readnext id else exit
readv rec from workfile,id,1 then
wtext=rec<1>:char(13):char(10)
nbytes=len(wtext)
if %write(fd,wtext,n_bytes) < n_bytes then
print "Error writing"
end
end
repeat
if %close(fd) # 0 then
print "Error closing the file"
end


In D3/nix

The same but use /path, not c:/path

compile it using:

compile fileprog progname (fo


The one that asked this in RD forums used to use OSFI and dynamic
arrays and when the file was big he used Accuterm. In the best of his
tests it takes one hour to create (transfer) a 13MB file.

When he test my program it takes 10 SECONDS to create a 100MB file.


And THIS IS THERE since AP/DOS, some years ago


Hope this help
joseba


Reply With Quote
  #8  
Old   
jra
 
Posts: n/a

Default Re: Best Way to Build Large Item to Share with Windows World - 09-01-2005 , 03:43 PM



I have asked google and find out this on 1996:

had that problem sometime ago with AP/DOS. For me the quickest
solution is the "C" options of AP/DOS
This is the program that reads some records from a PICK file and write
them in DOS

******------------------***********************
:u sub carga
sub 'carga' size = 519
01 include dm,bp,dos fcntl.h
02 include dm,bp,dos errno.h
03 fh=%open("jos.dat",O$TRUNC+O$CREAT+O$RDWR,S$IREAD+ S$IWRITE)
04 if fh<0 then print "error al abrir ":;stop
05 open "prog" to vf else abort
06 eof=0
07 conta=0
08 tra=''
09 select vf
10 loop
11 readnext var else eof=1
12 conta=conta+1
13 print conta
14 until eof=1 do
15 read b from vf,var then
16 b<-1>="<$$>":var:"<$$>":char(10);*i include the item key in the
last atribute with some marks
17 maxtam=len(b)
18 rc=%write(fh,b,maxtam)
19 if rc<0 then print "error al escribir":;stop
20 end
21 repeat
22 rc=%close(fh)
23 if rc<0 then print "error al cerrar":;stop
********************************-----------------------********************



ON 1996, 9 years ago.


Reply With Quote
  #9  
Old   
Excalibur
 
Posts: n/a

Default Re: Best Way to Build Large Item to Share with Windows World - 09-01-2005 , 04:49 PM



Hi
The fact that unix.h extensions also apply to Windows is not immediately
apparent. One of those wonderful misnaming accidents that can happen in any
system.
Remember that anything compiled with the (o) option cannot work with items
that are not compiled that way, it must stand alone.
Regards
Peter McMurray
"jra" <frelance (AT) sarenet (DOT) es> wrote

Quote:
In D3/Windows


include dm,bp,unix.h fcntl.h
open "dos:c:/" to cfile
open "file" to workfile
bf=""
write bf on cfile,"dosfile"
close cfile
fd=%open("c:/dosfile",O$RDWR)
select workfile
wtext=""
loop
readnext id else exit
readv rec from workfile,id,1 then
wtext=rec<1>:char(13):char(10)
nbytes=len(wtext)
if %write(fd,wtext,n_bytes) < n_bytes then
print "Error writing"
end
end
repeat
if %close(fd) # 0 then
print "Error closing the file"
end


In D3/nix

The same but use /path, not c:/path

compile it using:

compile fileprog progname (fo


The one that asked this in RD forums used to use OSFI and dynamic
arrays and when the file was big he used Accuterm. In the best of his
tests it takes one hour to create (transfer) a 13MB file.

When he test my program it takes 10 SECONDS to create a 100MB file.


And THIS IS THERE since AP/DOS, some years ago


Hope this help
joseba




Reply With Quote
  #10  
Old   
Tony Gravagno
 
Posts: n/a

Default Re: Best Way to Build Large Item to Share with Windows World - 09-01-2005 , 06:02 PM



"jra" <frelance (AT) sarenet (DOT) es> wrote:
Quote:
I have asked google and find out this on 1996:
ON 1996, 9 years ago.

Which is one of the reasons why I'd rather point to existing responses
than post code. If people learn how to fish, some will be less
inclined to ask for fish. I know, people are passionate on both sides
of that argument.

Ya know, we really could use a FAQ for this group. Jon Sisk was doing
that a long time ago but I think for lack of interest from the group,
or maybe lack of appreciation, that effort died. Oh well, status quo.

T




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.