Calling a abf frame from C-program..

Calling a abf frame from C-program..

Post by Prabhu Veena Prabhak » Fri, 14 Jan 1994 16:44:34



  We have a typical problem with ingres.. One application
is developed already in abf (Ingres 4GL). Now we want to intigrate it with
another one..
The old applicatio n is written in esql-c and we are unable to fined a way to call the frame of same
application
through embeded esql program..

Is there any way through you can call the frame of same applica  application through esql C..../.  

We are using Ingres 5.0.

-Waiting for an experts advice..

-Suhas

 
 
 

Calling a abf frame from C-program..

Post by Bruce Horroc » Sat, 15 Jan 1994 10:15:05



>Is there any way through you can call the frame of same applica  application
> through esql C..../.  

>We are using Ingres 5.0.

Yes, I did this a few years back but I haven't got the code anymore,
however the steps are as follows:

1) Ingres passes variables from OSL frame to OSL frame/procedure using
   a structure. The underlying C call passes a pointer to this structure
   *not* the variables themselves. Naturally the structure changes in
   size depending upon how many variables are being passed.

2) Therefore, write a dummy piece of OSL that calls the frame you want
   and has the correct number and type of variables, etc. Compile this
   OSL to produce a .OBJ file, but keep the .c file.

3) Examine the .c to see what the structure looks like. Copy the structure
   into your C or ESQL/C program.

4) To actually call the frame in the old application you need to:
   - populate the variables in the structure using C code
   - call the compiled name of the frame. You can find this out by
     examining the .c file created when the frame is compiled.

5) When the user quits out of the frame, the C code needs to access the
   values of any variables that may have been returned by reference.

Be warned that it is tricky and not very flexible eg adding another
variable to the parameter list of the frame is a pain. I haven't looked
to see how Ingres passes quesries to a called frame. I assume that it is
simply another pointer to a structure holding the query added to the
structure holding the list of parameters being passed.

Regards,
--
-------------------------------------------------------------------------------
Bruce Horrocks                                  So much to think about
Surrey, England                                   so little to think with.

-------------------------------------------------------------------------------

 
 
 

Calling a abf frame from C-program..

Post by James Ca » Wed, 19 Jan 1994 23:38:20



:                                                                              
:   We have a typical problem with ingres.. One application                    
: is developed already in abf (Ingres 4GL). Now we want to intigrate it with    
: another one..                                                                
: The old applicatio n is written in esql-c and we are unable to fined a way to
all the frame of same                                                          
: application                                                                  
: through embeded esql program..                                                
:                                                                              
: Is there any way through you can call the frame of same applica  application t
rough esql C..../.                                                              
:                                                                              
:                                                                              
: We are using Ingres 5.0.                                                      
:                                                                              
:                                                                              
: -Waiting for an experts advice..                                              
:                                                                              
: -Suhas                                                                        
:                                                                              

You can specify on the command line an alternate startup frame (form),          

      (in VMS, you translate to other)                                          
          newframe :== $sys$login:myapp.exe -palternate_frame                  

     The -p flag defines the alternate frame name.  As a bonus for              
     INGRES 6.4 users, the -noforms flag will let you run procedures            
      (this will let you run ABF in batch mode).                                

     So, in your ESQL/C program, define the external symbol(command)            
        and execute it via call system (or other means of your choice).        

     Hope this helps you with V5.0, its hidden in various places of the        
     V6.3+ manuals (-noforms is in the V6.3 manuals even though it will        
     only work under V6.4).                                                    

                           Jim

 
 
 

1. Passing role/group to called ABF QBF/RBF frames

This originally began as a question on the SUID bit under OI 1.1.  I've
resigned myself to the fact that OI doesn't honor thw SUID bit in the way
6.x did.  I've tried using roles but cannot get past the role password
(posted separately) so now I'm trying groups. Now I find I cannot pass
the ABF/4GL application group (from the command line) to called QBF/RBF
frames or at least I cannot find it.  

I guess I could use the CALL SYSTEM statement and generate a command line
call to qbf but that seems a bit kludgy.  (I should point out that I do
not have the Vision/ABF/4GL docs for OI, just 6.4.).

Am I missing something?  Is my caffeine level too low?

TIA,
Lucky
NAIUA Member

Lucky Leavell                            Phone: (812) 945-6555
Relational Information Systems, Inc.       FAX: (812) 949-9233

New Albany, IN 47150-2013                       71534,2674 (CompuServe)
                                 WWW Home Page:  http://wl.iglou.com/ris

2. Problems connecting to 8i-Server over Internet TCP/IP !?

3. Too many permits - Was: Passing role/group to called ABF QBF/RBF frames

4. ingres parameters

5. Calling ABF Frame/Procedure From 3GL

6. Adding a literal root element.

7. ABF-Proc/Frames Multiple Applikations

8. Table query

9. ABF/QBF frames ignore group for validation

10. ODP: Destroying many ABF frames

11. Destroying many ABF frames

12. ABF Application: C procedure and 4GL frame

13. Passing table field rows to an ABF frame