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

Conference iosg::all-in-1_v30

Title:*OLD* ALL-IN-1 (tm) Support Conference
Notice:Closed - See Note 4331.l to move to IOSG::ALL-IN-1
Moderator:IOSG::PYE
Created:Thu Jan 30 1992
Last Modified:Tue Jan 23 1996
Last Successful Update:Fri Jun 06 1997
Number of topics:4343
Total number of notes:18308

3190.0. "OAFC programming manuals" by WPOPTH::WPOAJB::Beeson (Down Under in the bottom left corner) Wed Aug 25 1993 10:22

Hi,

What programming manuals are available for the file cabinet server?  I have 
the API (AA-PKUCB-TE).  Is there a guide also?  If so, can it be copied of the 
net?

Regards,
ajb
T.RTitleUserPersonal
Name
DateLines
3190.1You have it allCHRLIE::HUSTONWed Aug 25 1993 14:2911
    
    Nope, what you have is the reference manual and API spec all in one.\
    
    there should be sections at the beginning of the book that talk about
    generic subjects, as well as an example program at the end. Though
    the example program will not work as is (long story), it has the 
    basic steps for what you need. I believe what you would have to
    change is only the partition name in the example code.
    
    --Bob
    
3190.2ALMOST got it all...WPOPTH::WPOAJB::BeesonDown Under in the bottom left cornerThu Aug 26 1993 03:2920
Yep,

The example program is pretty much what I think I need.  But it ain't in 
no example!  The chapters are:

	1	Intro
	2	Common Data Structures
	3	Main Arguments
	4	General Rules
	5	Main Routines
	6	OpenVMS Sys. Mgmt. Rout. & Fac.
	7	Error Messages
	A	ALL-IN-1 Ver 2.4 Compat.

My real problem is I have written some simple code (just tries to open a 
file cabinet) and I get an 'Invalid arguments error'.  So an example would 
be good.

Regards,
ajb
3190.3let me see itCHRLIE::HUSTONThu Aug 26 1993 15:029
    
    The example code will make an OafcOpenCabinetW call, as well as show
    how to build all the params.  It is in appendix B.
    
    If this doesn't help, put the code segment in here that builds the
    params and I will look at it.
    
    --Bob
    
3190.4Are we talking about the same manual?WPOPTH::BEESONDown Under in the bottom left cornerTue Aug 31 1993 06:3546
    Hi, sorry it has taken me so long to come back...
    
    The contents of my manual stops at Appendix A. It is for:
    	FCS V1.1
    	VMS V5.5
    	IOS V3.0
    	TLC V2.0
    
    My code is attached.
    
    Regards,
    ajb
    
#include "sys$library:oafcext"
#include "sys$library:oafcdef"

main()
{
	OafcTEXT8 user[] = "BEESON";
	OafcTEXT8 pas1[] = "ADIFFERENTPASSWORD";
	OafcTEXT8 pas2[] = "";
	OafcTEXT8 cab[] = "WPOPTH.BEESON ANDREW";
	OafcClientSession *session;
	OafcUsertoken ut;
	OafcUINT32 status;
	OafcStatus fcstatus;

	ut.vms_account = user;
	ut.vms_account_len = strlen(user);
	ut.vms_password = pas1;
	ut.vms_password_len = strlen(pas1);
	ut.vms_password2 = pas2;
	ut.vms_password2_len = strlen(pas2);

	session = malloc(sizeof(OafcClientSession));

	status = OafcOpenCabinetW(cab, (OafcStringLength)strlen(cab), 
		 (OafcSessionChar)OafcM_SessionRmsFileCab
			| OafcM_SessionMultiThread
			| OafcM_SessionEnglish,
		 &ut, &session, &fcstatus, (OafcCMParameters*)"txt",
		 (OafcStringLength)3);

	lib$signal(fcstatus.status1);
}
    
3190.5not quiteIOSG::EDMONDSONEstne volumen in toga, an solum tibi libet me videre?Tue Aug 31 1993 12:4814
    
    You have a "field test" version of the book.  This is a
    slightly-revised version of the one that was issued for ALL-IN-1
    Version 3.0 (AA-PKUCA-TE).  
    
    One of the revisions was to remove the example, because it doesn't
    work.  Unfortunately, there are currently no resources available to
    write and test a new (working) example.
    
    At the moment, I don't even know when an updated version of this book
    is to be issued.
    
    Sorry,
    Ro
3190.6found your problmeCHRLIE::HUSTONTue Aug 31 1993 14:5449
    
    Just off the top of my head I see two problems with your code:
    
>	ut.vms_account = user;
>	ut.vms_account_len = strlen(user);
>	ut.vms_password = pas1;
>	ut.vms_password_len = strlen(pas1);
>	ut.vms_password2 = pas2;
>	ut.vms_password2_len = strlen(pas2);

    Here is the first that I see (not what you're seeing). You have passed
    an empty string as teh secondary password. You should be passing a 
    NULL pointer. They are vastly different. If this makes it to the 
    FCS, it will check the first pwd, assuming this is ok, it will then
    check if you passed a secondary password. It will see the pointer
    and will say, "Oh, he thinks he has a secondary password, he doesn't
    so reject it"
    
    >	status = OafcOpenCabinetW(cab, (OafcStringLength)strlen(cab), 
    >		 (OafcSessionChar)OafcM_SessionRmsFileCab
    >			| OafcM_SessionMultiThread
    >			| OafcM_SessionEnglish,
    >		 &ut, &session, &fcstatus, (OafcCMParameters*)"txt",
    >		 (OafcStringLength)3);

    THe reason for the error you are seeing is the CM parameters
    that you are passing. If you pass any at all (I've never seen them
    used during opens), it has to be a TLV encoded byte stream. You passed
    a text string, the FCS can't figure out what you meant, hence the
    error.
    
    Rowena, as for corrected example code, it was suppose to be done over
    there, the example code is one of the most important parts of the book.
    ISVs that have been given the interface have commented they couldn't
    live without it. I believe Trevor Talbot and Suzanne Cooper were
    updating it, they were working on it last time I was over and I think
    they had it done. It would not be a hard task for someone familiar with
    the interface to get it updated. If at all possible, it should be in
    the manual.
    
    AJB, if you want the example code (the one that doesn't work) let me 
    know and I will try and dig up an online copy and mail it to you.
    It has the basics rigth, the problems are the naming of partitions and
    drawers that it uses are no longer supported, everything else is fine.
    
    --Bob
    
    
    
3190.7Examples please!WPOPTH::BEESONDown Under in the bottom left cornerWed Sep 01 1993 05:0917
    Hi,
    
    I agree with Bob, I have never tried to build an run an example but
    rather use them to formulate specific calls (where I have problems such
    as this one).  Assuming it is syntatically correct, I'd say stick the
    example back in.
    
    Bob, thanks for the pointers.  Number 1 I should have picked up, nuber
    2 wasn't so clear.  The manual didn't describe OafcCMParameters - I
    guess I should have checked the header file.  btw: I originally was
    passing a 0 for the last two parameters, which also failed.
    
    If you have a copy of an example my address is Andrew Beeson at WPO or
    WPOPTH::BEESON.  Thanks for your help.
    
    Regards,
    ajb
3190.8are you all set now?CHRLIE::HUSTONWed Sep 01 1993 15:277
    
    The manual I have describes the CM params in page 3-35.
    
    Did you get past the problem? If not I will look at the code again.
    
    --Bob