[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference azur::mcc

Title:DECmcc user notes file. Does not replace IPMT.
Notice:Use IPMT for problems. Newsletter location in note 6187
Moderator:TAEC::BEROUD
Created:Mon Aug 21 1989
Last Modified:Wed Jun 04 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:6497
Total number of notes:27359

873.0. "How to Link Sample Programs" by GRANE::HEINTZE () Thu Apr 04 1991 18:10

I want to understand if 

 (1) MCC provides index structures (do we have to write our own Btrees?)
 (2) MCC provides concurency control for multiple processes (as opposed to
          threads).

Note 622.5 recommended I read the manual.  Well I'm still kinda fuzzy (two
of us read it and discussed it and we still don't understand).

So I decided to try out the sample program on page 395 of the SRM.  Maybe
that would clear things up.

How do I link this beast?  It sure would be nice if this was in SYS$EXAMPLES
along with  .COM file to link it.

I did link against 
sys$share:vaxcrtl.exe/share


 But I still got a lot of undefined symbols.  Can someone answer the above
questions and tell me how to link?

                       Sieg

Compiling  ... 
Linking ... 
%LINK-W-NUDFSYMS, 25 undefined symbols:
%LINK-I-UDFSYM, 	MCC_AES_CREATE 
%LINK-I-UDFSYM, 	MCC_AES_DELETE 
%LINK-I-UDFSYM, 	MCC_AHS_CREATE 
%LINK-I-UDFSYM, 	MCC_AHS_DELETE 
%LINK-I-UDFSYM, 	MCC_ENR_ENROLL 
%LINK-I-UDFSYM, 	MCC_ENR_SAVE_BIAS 
%LINK-I-UDFSYM, 	MCC_ILV_PUT 
%LINK-I-UDFSYM, 	MCC_ILV_PUT_PARAM_BEGIN 
%LINK-I-UDFSYM, 	MCC_ILV_PUT_PARAM_END 
%LINK-I-UDFSYM, 	MCC_MIR_ADD_IDENTIFIER 
%LINK-I-UDFSYM, 	MCC_MIR_CREATE_INSTANC 
%LINK-I-UDFSYM, 	MCC_MIR_CREATE_INSTANCE 
%LINK-I-UDFSYM, 	MCC_MIR_CREATE_REPOSITORY 
%LINK-I-UDFSYM, 	MCC_MIR_DEL_ATTR_DATA 
%LINK-I-UDFSYM, 	MCC_MIR_DEL_INSTANCE 
%LINK-I-UDFSYM, 	MCC_MIR_GET_IDENTIFIERS 
%LINK-I-UDFSYM, 	MCC_MIR_GET_REPOSITORY_ID 
%LINK-I-UDFSYM, 	MCC_MIR_GET_SUB_CLASSES 
%LINK-I-UDFSYM, 	MCC_MIR_READ_ATTR_DATA 
%LINK-I-UDFSYM, 	MCC_MIR_READ_INSTANCE_KEY 
%LINK-I-UDFSYM, 	MCC_MIR_REMOVE_IDENTIFIER 
%LINK-I-UDFSYM, 	MCC_MIR_RENAME_IDENTIFIER 
%LINK-I-UDFSYM, 	MCC_MIR_TRANSLATE_IDENT 
%LINK-I-UDFSYM, 	MCC_MIR_WRITE_ATTR_DATA 
%LINK-I-UDFSYM, 	MIR_FM_DISPATCH_TABLE 
T.RTitleUserPersonal
Name
DateLines
873.1kernel shareTOOK::CALLANDERThu Apr 04 1991 19:2910
you are failing the link because you must link it with the mcc_kernel_shr
as well as the c run time library. The instructions on link are in the
guide to writing an access module.

If you are using an options file add into it the lines:

sys$share:mcc_kernel_shr/share
sys$share:vaxcrtl/share

This will pull in the files you need to link against.
873.2Some things to try, and some (more) things to readTOOK::GUERTINI do this for a living -- reallyThu Apr 04 1991 19:4430
    RE:.0
    
    I'm not exactly sure what you mean by index structures.  If you mean
    common routines for B-tree management, then no, we don't.
    
    The MCC Kernel supports interprocess concurrency control only through
    the mcc_lock_... routines.  I'm not sure if these routines are fully
    supported on Ultrix, since Ultrix has more restrictions on managing
    system resources (such as locks).
    
    Building a management module requires (yet another) manual called
    the "Guide to Writing a Management Module", or "Management Module
    Programming", or something like that.  I don't have the list of
    MCC documentation handy.  But there is note in this conference
    someplace which gives a pointer to all the latest MCC Documentation
    (with the exception of the SRM which must be ordered).  You could try
    directory/key=documentation.  (They're someplace on node WORDY::.)
    
    Some things you are probably missing.  You need to link with
    sys$share:mcc_kernel_shr.exe/share and define the entry points in
    your dispatch table (not defined in the SRM for the example), as
    Universal symbols in your link options files.  Also you need to
    link as a shareable image (I assume you want to run as an FM or AM,
    not as a PM).
    
    When I wrote that sample program for MIR routine usage, I compiled,
    linked, and ran it on an MCC V1.0 VMS platform, so it should still
    work (I think).
    
    -Matt.
873.3MCC & ULTRIX Locks I'm not exactlyGRANE::HEINTZEFri Apr 05 1991 16:2410
>    The MCC Kernel supports interprocess concurrency control only through
>    the mcc_lock_... routines.  I'm not sure if these routines are fully
>    supported on Ultrix, since Ultrix has more restrictions on managing
>    system resources (such as locks).
    
   Can you give me some more information on this?  I need to confirm it.
If it is true, we might be in big trouble.

                       Sieg
873.4MCC locks ARE supported on UltrixTOOK::T_HUPPERThe rest, as they say, is history.Tue Apr 09 1991 17:2819
    The MCC kernel FULLY supports mcc_lock... routines on Ultrix.  What it
    costs you is Ultrix *semaphore* resources.  The default semaphore setup
    on Ultrix is pitiful: 10 semaphore sets.  A semaphore set is required
    for *each* unique lock created.
    
    The fix is simple:
    
    (1) Edit /usr/sys/h/sem.h to change SEMMNI (max # of semaphore sets),
    SEMMNS (max # of semaphores per set), SEMMNU (max # of semaphore undo
    structures), and possibly SEMUME (max # of undo entries per undo
    structure).
    (2) Rebuild your kernel.
    
    Note that MCC locks require 5 semaphores per set, so SEMMNS must be at
    least 5 X SEMMNI.  Also, there is a hard limit in Ultrix of about 32K
    sempahores.  I don't know how much memory each semaphore requires, but
    memory is cheap these days.
    
    Ted
873.5A few more semaphore questions?TENERE::SILVACarl Silva - Telecom Eng - DTN 828-5339Wed Apr 10 1991 14:1117
>    The MCC kernel FULLY supports mcc_lock... routines on Ultrix.  What it
>    costs you is Ultrix *semaphore* resources.  The default semaphore setup
>    on Ultrix is pitiful: 10 semaphore sets.  A semaphore set is required
>    for *each* unique lock created.

	So only a lock of 10 SQL tabel entries could be performed?

>    Note that MCC locks require 5 semaphores per set, so SEMMNS must be at
>    least 5 X SEMMNI.  Also, there is a hard limit in Ultrix of about 32K
>    sempahores.  I don't know how much memory each semaphore requires, but
>    memory is cheap these days.

	Does this reflect the number of SQL table rows that MCC can have locked
simultaneously?  Or is it the number of MCC processes?  How does this relate to
MCC directives?

	Carl