Is there a portable ADS with an ISAM interface?

This forum is for eXpress++ general support.
Message
Author
User avatar
Tom
Posts: 1170
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: Is there a portable ADS with an ISAM interface?

#21 Post by Tom »

Hi, Jimmy.

I don't want to look at Eugenes code. What you say is simply not true. A loop like the one you showed does not create a SELECT for every iteration or something like that. The PGDBE does not work that way. Just try. Create an upsize file, upsize the data, create the connection, set the session, run the code. Even for a part of the app. The results are very, very good.
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

User avatar
Auge_Ohr
Posts: 1406
Joined: Wed Feb 24, 2010 3:44 pm

Re: Is there a portable ADS with an ISAM interface?

#22 Post by Auge_Ohr »

hi Tom,

i use my "native" Control with LibPQ.DLL and a do know how i can use "Cache" with virtual Data to "simulate" LOOP with SKIP

and Yes much have be done since my last Test with PgDBE which we got 2012 at Langenhagen

under harbour now i have access to Source of RDD like PostgreSQL or MySQL to Emulate ISAM Style (without internal FIELD(s))

so i can "imagine" what Alaska have done with "internal" FIELD(s) to emulate ISAM Style

---

how many User have switch to PgDBE :?:

i guess many have try it but found "some" Problem and it have take time to find Solution
don´t tell me you had not Problem before "optimize" Code for PgDBE.

if you write a new Project, and have made a Concept ( Pflichtenheft ) before, i would think about using PgDBE

but Eugene search for a Solution for his Source-Code and i guess it will be a lot Work for him
as i say i would "compress" Data which is a "fast" Solution which need not much Work
greetings by OHR
Jimmy

User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: Is there a portable ADS with an ISAM interface?

#23 Post by Eugene Lutsenko »

Thanks! While I'm just reading and thinking

User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: Is there a portable ADS with an ISAM interface?

#24 Post by Eugene Lutsenko »

Tom wrote: Tue Jan 04, 2022 4:56 am Hi, Jimmy.

I don't want to look at Eugenes code. What you say is simply not true. A loop like the one you showed does not create a SELECT for every iteration or something like that. The PGDBE does not work that way. Just try. Create an upsize file, upsize the data, create the connection, set the session, run the code. Even for a part of the app. The results are very, very good.
Hello, Tom!

What code do you have in mind? The full source text of the Eidos system: http://lc.kubagro.ru/__AidosALL.txt ?
Or a small specially written code debugging example:

Code: Select all

     
     PROCEDURE AppSys
     // Рабочий стол остается окном приложения
     RETURN
     
     ********************************************************************************
     FUNCTION Main()
     
     LOCAL Getlist := {}, oProgress, oDialog
     LOCAL aSay[30], Mess97, Mess98, Mess99               // Массив сообщений отображаемых стадий исполнения (до 30 на экране)

        DC_IconDefault(1000)

        SET DECIMALS TO 15
        SET DATE GERMAN
        SET ESCAPE On

********************************************************************

mNField  = 2048
mNRecord = 1000000000


mNField  = 10
mNRecord = 10000000

@1,1  DCGROUP oGroup1 CAPTION 'Задайте параметры базы данных:' SIZE 40.0, 3.5

@1,2  DCSAY "Количество полей:"                  PARENT oGroup1 
@1,20 DCSAY "" GET mNField  PICTURE "##########" PARENT oGroup1 

@2,2  DCSAY "Количество записей:"                PARENT oGroup1 
@2,20 DCSAY "" GET mNRecord PICTURE "##########" PARENT oGroup1 

DCREAD GUI;
      TO lExit ;
      FIT;
      ADDBUTTONS;
      MODAL;
      TITLE 'Эксперименты с ADS и PGDBU'
      IF lExit
         ** Button Ok
      ELSE
         QUIT
      ENDIF
********************************************************************

   Wsego = mNRecord

   // Отображение стадии исполнения. Будет написано прямо в окне Progress-bar
   d = 0
   @0,0 DCGROUP oGroup1 CAPTION 'Стадии исполнения процесса' FONT "6.Helv" SIZE 105+d, 2.5 PARENT oTabPage1
   @4,0 DCGROUP oGroup2 CAPTION 'Прогноз времени исполнения' FONT "6.Helv" SIZE 105+d, 5.0 PARENT oTabPage2
   
    s = 1
   @s++,1 DCSAY " " SAYSIZE 100 SAYOBJECT aSay[ 1] FONT "10.Helv"
    s++
   @s++,1 DCSAY " " SAYSIZE 100 SAYOBJECT oSay97   FONT "10.HelvBold"
    s++
   @0.2+s++,1 DCSAY " " SAYSIZE 100 SAYOBJECT oSay98 FONT "9.Helv Bold" COLOR GRA_CLR_BLUE
   @1.5+s  ,1 DCSAY " " SAYSIZE 100 SAYOBJECT oSay99 FONT "9.Helv Bold" COLOR GRA_CLR_BLUE
   
   @s  ,1 DCPROGRESS oProgress ;
          SIZE 95,1.5 ;
          PERCENT ;
          EVERY 1;                          // Кол-во обновлений изображения
          MAXCOUNT Wsego; 
          COLOR GRA_CLR_CYAN                // Цвет полосы
   @s++,97 DCPUSHBUTTON  CAPTION '&Cancel' ;
          ACTION {||lOk:=.T.} OBJECT oButton ;
          SIZE 7,1.5
   DCREAD GUI ;
          TITLE 'Создание базы данных "BigData.dbf"' ;
          PARENT @oDialog  ;
          FIT ;
          EXIT ;
          MODAL

   oDialog:alwaysOnTop = .T.       // Окно открывается на переднем плане
   oDialog:show()

   ****** Обработка ошибки ******************
   bError := ErrorBlock( {|e| Break(e)} )           // установить новый кодовый блок обработки ошибок
   BEGIN SEQUENCE                                   // код нормального исполнения

         *** код нормального исполнения

         aStructure := { { "NumbRecord"  , "N", 19, 0} }
         
         FOR j=1 TO mNField
             FieldName = "F"+ALLTRIM(STR(j,19))
             AADD(aStructure, { FieldName  , "N", 19, 7 })
         NEXT
         DbCreate( "BigData.dbf", aStructure )

   RECOVER                                          // код обработки ошибки
         aMess := {}
         AADD(aMess, "Возникла ошибка при попытке создания БД с числом полей: "+ALLTRIM(STR(mNField)))
         LB_Warning(aMess)
         MsgBox('')
         QUIT
   ENDSEQUENCE 
   ErrorBlock( bError )                             // переустановить старый кодовый 
   ******************************************

   // Начало отсчета времени для прогнозирования длительности исполнения
   Time_progress = 0
   // Прошло секунд с начала процесса
   // Процесс может идти больше суток, поэтому для определения
   // во всех случаях вычисляется время, прошедшее с начала года
      T_Mess1    = "Начало:"+" "+TIME()            // Начало
      Sec_1      = (DOY(DATE())-1)*86400+SECONDS()
      PUBLIC T1 := (DOY(DATE())-1)*86400+SECONDS()        // Время предыдущей индикации процесса исполнения
      PUBLIC T2 := (DOY(DATE())-1)*86400+SECONDS()+1      // Текущее время (1-й раз оно заметно больше T1 чтобы было отображение)
      PUBLIC T1tp := T1
      PUBLIC T2tp := T2
   *********************************************************************************

   ****** Обработка ошибки ******************
   bError := ErrorBlock( {|e| Break(e)} )           // установить новый кодовый блок обработки ошибок
   BEGIN SEQUENCE                                   // код нормального исполнения

         *** код нормального исполнения

         aSay[ 1]:SetCaption('Идет процесс создания базы данных: "BigData.dbf"')

         USE BigData EXCLUSIVE NEW

         FOR r=1 TO mNRecord

             APPEND BLANK
             REPLACE NumbRecord WITH r

             lOk = Time_Progress (++Time_Progress, mNRecord, oProgress, lOk )

         NEXT

   RECOVER                                          // код обработки ошибки
         CLOSE ALL
         aMess := {}
         AADD(aMess, "Возникла ошибка при попытке добавления в БД записи N=й: "+ALLTRIM(STR(r)))
         LB_Warning(aMess)
         MsgBox('')
         QUIT
   ENDSEQUENCE 
   ErrorBlock( bError )                             // переустановить старый кодовый 
   ******************************************

   CLOSE ALL

   oSay97:SetCaption(oSay97:caption)
   oButton:SetCaption('&Ok')          // Деструктурирование окна отображения графического Progress-bar
   oButton:activate := {||PostAppEvent(xbeP_Close,,,oDialog)}  //<<<<<< Add This
   DC_AppEvent( @lOk )
*  PostAppEvent(xbeP_Activate,,,DC_GetObject(GetList,'DCGUI_BUTTON_OK'))       // Роджер
   oDialog:Destroy()

   aMess := {}
   AADD(aMess, 'База данных: "BigData.dbf" успешно создана')
   LB_Warning(aMess, 'Эксперименты с "BigData.dbf"')

   RETURN NIL

   ***********************************************************************************************************************

   FUNCTION LB_Warning( message, ctitle )
   
     LOCAL aMsg := {}
   *  DEFAULT cTitle TO ''
     IF valtype(message) # 'A'
       aadd(aMsg,message)
     ELSE
       aMsg := message
     ENDIF
     IF LEN(ALLTRIM(cTitle)) > 0
        DC_MsgBox(10,10,aMsg,cTitle)
     ELSE
        DC_MsgBox(10,10,aMsg,'Эксперименты с "BigData.dbf"')
     ENDIF
   
   RETURN NIL

   ***********************************************************************************************************************

***********************************************************************************************************
****** Графический прогресс-бар (на основе примера XSample_14() xdemo.exe)
***********************************************************************************************************
FUNCTION Time_Progress(Time_Progress, Wsego, oProgress, lOk )

    LOCAL nMaxCount := Wsego
    xtime     = Time_Progress

    ** Отображение занимает очень много времени, поэтому показывать прогресс не чаще чем через 0.1 секунды (как в PercTimeVisio())

    T2tp = (DOY(DATE())-1)*86400+SECONDS()          // Текущее время
    IF T2tp - T1tp > 0.1 .OR. xtime = Wsego         // Время в секундах или 100%

*      aSay[mPTVnumb]:SetCaption(mPTVmess+' '+ALLTRIM(STR(mNumPP/Wsego*100,15,7))+'%')

       *** Индикация времени исполнения

       ***** Процесс может идти больше суток, поэтому для определения
       ***** во всех случаях вычисляется время, прошедшее с начала года
*      T_Mess1 = "Начало:"+" "+TIME()           // Начало

       ***** Прошло секунд с начала процесса
       PUBLIC T_Mess2 := "ch:mi:se"
       Sec_2   = (DOY(DATE())-1)*86400+SECONDS() - Sec_1
       ch2 = INT(Sec_2/3600)                    // Часы
       mm2 = INT(Sec_2/60)-ch2*60               // Минуты
       cc2 = Sec_2-ch2*3600-mm2*60              // Секунды
       T_Mess2 = "Прошло:"+" "+ALLTRIM(STRTRAN(T_Mess2,"ch",STR(ch2,19)))
       T_Mess2 = STRTRAN(T_Mess2,"mi",STRTRAN(STR(mm2,2)," ","0"))
       T_Mess2 = STRTRAN(T_Mess2,"se",STRTRAN(STR(cc2,2)," ","0"))
       *@19,2 SAY T_Mess2+" всего: "+ALLTRIM(STR(Sec_2,17))+" сек."

       PUBLIC T_Mess3 := "ch:mi:se"             // Осталось
       Sec_3 = Sec_2*Wsego/xtime                // Прогн.длит.исп. в секундах
       ch3 = INT(Sec_3/3600)                    // Часы
       mm3 = INT(Sec_3/60)-ch3*60               // Минуты
       cc3 = Sec_3-ch3*3600-mm3*60              // Секунды
       T_Mess3 = ALLTRIM(STRTRAN(T_Mess3,"ch",STR(ch3,19)))
       T_Mess3 = STRTRAN(T_Mess3,"mi",STRTRAN(STR(mm3,2)," ","0"))
       T_Mess3 = STRTRAN(T_Mess3,"se",STRTRAN(STR(cc3,2)," ","0"))
       *@20,2 SAY T_Mess3+" всего: "+ALLTRIM(STR(Sec_3,17))+" сек."

       PUBLIC T_Mess4 := "ch:mi:se"             // Окончание
       Sec_4 = Sec_1 + Sec_3 - (DOY(DATE())-1)*86400
       ch4 = INT(Sec_4/3600)                    // Часы
       mm4 = INT(Sec_4/60)-ch4*60               // Минуты
       cc4 = Sec_4-ch4*3600-mm4*60              // Секунды
       T_Mess4 = "Окончание:"+" "+ALLTRIM(STRTRAN(T_Mess4,"ch",STR(ch4,19)))
       T_Mess4 = STRTRAN(T_Mess4,"mi",STRTRAN(STR(mm4,2)," ","0"))
       T_Mess4 = STRTRAN(T_Mess4,"se",STRTRAN(STR(cc4,2)," ","0"))
       *@21,2 SAY T_Mess4+" всего: "+ALLTRIM(STR(Sec_4,17L())+" сек.с нач.суток")

       PUBLIC T_Mess5 := "Средн.время обработки 1-го объекта: ch:mi:se"
       Sec_5 = Sec_2/xtime
       ch5 = INT(Sec_5/3600)                    // Часы
       mm5 = INT(Sec_5/60)-ch5*60               // Минуты
       cc5 = Sec_5-ch5*3600-mm5*60              // Секунды
       T_Mess5 = ALLTRIM(STRTRAN(T_Mess5,"ch",STR(ch5,19)))
       T_Mess5 = STRTRAN(T_Mess5,"mi",STRTRAN(STR(mm5,2)," ","0"))
       T_Mess5 = STRTRAN(T_Mess5,"se",STRTRAN(STR(cc5,2)," ","0"))
       *@22,2 SAY T_Mess5+" всего: "+ALLTRIM(STR(Sec_5,17))+" сек."

       PUBLIC T_Mess6 := "ch:mi:se"             // Осталось
       Sec_6 = Sec_3 - Sec_2
       ch6 = INT(Sec_6/3600)                    // Часы
       mm6 = INT(Sec_6/60)-ch6*60               // Минуты
       cc6 = Sec_6-ch6*3600-mm6*60              // Секунды
       T_Mess6 = "Осталось:"+" "+ALLTRIM(STRTRAN(T_Mess6,"ch",STR(ch6,19)))
       T_Mess6 = STRTRAN(T_Mess6,"mi",STRTRAN(STR(mm6,2)," ","0"))
       T_Mess6 = STRTRAN(T_Mess6,"se",STRTRAN(STR(cc6,2)," ","0"))
       *@23,2 SAY T_Mess6+" всего: "+ALLTRIM(STR(Sec_6,17))+" сек."

       Mess98 = T_Mess1+SPACE(142-LEN(T_Mess1)-LEN(T_Mess4))+T_Mess4  // Начало, окончание (прогноз) 145
       oSay98:SetCaption(Mess98);oSay98:SetCaption(oSay98:caption)

       Mess99 = T_Mess2+SPACE(144-LEN(T_Mess2)-LEN(T_Mess6))+T_Mess6  // Прошло, осталось (прогноз)  146
       oSay99:SetCaption(Mess99);oSay99:SetCaption(oSay99:caption)

       DC_GetProgress( oProgress, Time_Progress, Wsego )              // Отображение графического Progress-bar

       DC_AppEvent( @lOk, 0, .01 )

       T1tp = T2tp
    ENDIF

RETURN lOk

User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: Is there a portable ADS with an ISAM interface?

#25 Post by Eugene Lutsenko »

And how to use the ADT database in your BIG DATA program? Is working with ADT very different from DBF?

User avatar
unixkd
Posts: 565
Joined: Thu Feb 11, 2010 1:39 pm

Re: Is there a portable ADS with an ISAM interface?

#26 Post by unixkd »

Hi

I have been using ADT for more than 15 years, earlier with ADSDBE and now with SQLExpress and I can tell you that ADT is by far more optimized with better performance than DBF tables. Table size limit is 16 exabites and many more. ADT under ADS gives you more power.

Thanks

Joe

User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: Is there a portable ADS with an ISAM interface?

#27 Post by Eugene Lutsenko »

unixkd wrote: Mon Jan 24, 2022 1:12 am Hi

I have been using ADT for more than 15 years, earlier with ADSDBE and now with SQLExpress and I can tell you that ADT is by far more optimized with better performance than DBF tables. Table size limit is 16 exabites and many more. ADT under ADS gives you more power.

Thanks

Joe
Thank you, unixkd!

I realized this a long time ago, but only now I got around to doing a gradual transition from dbf to ADT. I also know the disadvantages of this approach (I read forums). But I think that I really have no other options, because only ADS provides a smooth transition from dbf to SQL. Now I am interested in the possibility of using both DBF and ADT in the same program at the same time. I am interested in what is the maximum number of fields supported by ADT? Is it possible to work with ADT using Alaska commands+Express in the same style (ISAM) as with dbf. How much serious revision of the program in this case will work? How to create a ADT database using an array with a structure?

User avatar
Auge_Ohr
Posts: 1406
Joined: Wed Feb 24, 2010 3:44 pm

Re: Is there a portable ADS with an ISAM interface?

#28 Post by Auge_Ohr »

hi,

i wonder that you "think" about "Commercial" Product when you want to spread it as Open Source.
to use ADS / ADT you need a "Commercial" License and Support have end.
greetings by OHR
Jimmy

User avatar
Tom
Posts: 1170
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: Is there a portable ADS with an ISAM interface?

#29 Post by Tom »

ADSLOCAL needs no license, it comes for free with the (free) client kits (which are a little hard to get, since all downloads from SAP now use the "SAP ONE Support Launchpad"). And, no, SAP didn't stop supporting the ADS yet. They stopped the further development.
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

User avatar
Auge_Ohr
Posts: 1406
Joined: Wed Feb 24, 2010 3:44 pm

Re: Is there a portable ADS with an ISAM interface?

#30 Post by Auge_Ohr »

so you want recommend to "Start" with a Software which will be not supported in Future ?
greetings by OHR
Jimmy

Post Reply