[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

3030.0. "Copy/quota problem" by WPOPTH::BEESON (Down Under in the bottom left corner) Tue Jul 20 1993 09:06

    Hi,
    
    Let's say user1 is on disk1 and user2 is on disk2.  Both disks have
    quotas enabled and disk2 has an entry for user2 but none for user1.
    
    I have a script that creates a message and then copies a text file from
    the user's directory to the message ie:
    	COPY #QE_FN OA$CURMES_FILE
    
    Now, if user1 SMUs to user2 and then calls the script they get an error
    with the copy function.  I assume because they are not allowed to
    create a file on disk2 as user1.  Opening a text file and copying the
    text line by line works fine.
    
    Is this a known limitation a bug or something else? Is there a work
    around apart from copying the text line by line?
    
    Regards,
    ajb
T.RTitleUserPersonal
Name
DateLines
3030.1Use FILECAB functionsIOSG::MAURICEDifferently hirsuteTue Jul 20 1993 09:5413
    Hi,
    
    That's a limitation. You would have the same problem if you tried to do
    a DCL copy. The situation would be even more severe if the drawer was
    remote, since raising ALL-IN-1 privileges would have no affect.
    
    So the answer is to use the File Cabinet Server to do the copies for
    you. The FILECAB RESERVE_DOCUMENT & FILECAB REPLACE_DOCUMENT will do
    the job for you.
    
    Cheers
    
    Stuart
3030.2Problem with RESERVE...WPOPTH::BEESONDown Under in the bottom left cornerMon Jul 26 1993 10:1477
    Hi, Stuart,
    
    How are things going?  Thanks for the hint but I'm now having a bit of
    trouble with the RESERVE command.  I have tried the attached script to
    do some tests and it always fails (OA$STATUS=0) on the RESERVE command. 
    I couldn't find any examples that use the EXPORT style.  Am I doing
    something wrong or is ALL-IN-1/OAFC messing up?
    
    Regards,
    ajb
    
oa$mail_set_drawer
.if not oa$status then .goto set_drawer_error

Get "Creating message..." \ force
mail create /nosend/noedit/open
.if not oa$status then .goto create_error

Get "Adding text to the message..." \ force
mail text " "
.if not oa$status then .goto text_error

Get "Closing message..." \ force
mail close_message
.if not oa$status then .goto close_error

Get "Reserving message..." \ force
filecab reserve_document (drawer=oa$curdwr, document=oa$curmes, -
			  content_action="EXPORT", -
			  content_file="oauser:dummy.txt")
.if oa$status nes "1" then .goto reserve_error

Get "Replacing message..." \ force
filecab replace_document (drawer=oa$curdwr, document=oa$curmes, -
			  content_action="IMPORT", -
			  content_file="sys$login:login.com")
.if oa$status nes "1" then .goto replace_error

get #mess = "Create successful"
.goto exit

.label create_error
get #mess = "Create failed"
.goto exit

.label reserve_error
get #mess = "Reserve failed returning a status of: " oa$status
.goto delete_and_exit

.label replace_error
get #mess = "Replace failed returning a status of: " oa$status
.goto delete_and_exit

.label close_error
get #mess = "Close failed"
.goto delete_and_exit

.label text_error
get #mess = "Adding text failed"
.goto delete_and_exit

.label set_drawer_error
get #mess = "set drawer failed"
.goto exit

.label delete_and_exit
cabinet delete_document oa$curmes
.goto reset_drawer_and_exit

.label reset_drawer_and_exit
oa$mail_reset_drawer
.goto exit

.label exit
get #mess
.exit
    
3030.3User logicals not allowedIOSG::MAURICEDifferently hirsuteMon Jul 26 1993 11:4211
    Hi,
    
    The File Cab Server runs outside the context of ALL-IN-1, and so does
    not know about the values of logicals oauser & sys$login. I changed
    your script to use full file names and then it nearly worked! I also
    had to change my default editor from WPS-PLUS to EDT, since the mail
    create function was creating a .WPL file. Then it worked! 
    
    Cheers
    
    Stuart
3030.4Another gotcha...WPOPTH::WPOAJB::BeesonDown Under in the bottom left cornerTue Jul 27 1993 11:0411
Thanks Stuart,

For anyone else following this note it appears that the 
file exported to must not exist.

Stuart, could either the file cabinet client code be 
written to perform the translation itself or the 
documentation made a little clearer?

Regards,
ajb
3030.5IOSG::MAURICEDifferently hirsuteTue Jul 27 1993 11:2721
    Hi,
    
> For anyone else following this note it appears that the 
> file exported to must not exist.

    Did you specify the extension? Originally I didn't and it just created
    the next version of the file. When I specified the extension I got the
    reserve error. I think that's probably what should happen, but I agree
    that it should be documented.
    
> Stuart, could either the file cabinet client code be 
> written to perform the translation itself or the 
> documentation made a little clearer?
    
    Best is to raise a problem report. Customer reported problems have a
    higher priority than internally raised problems, so you get better
    odds if you raise it rather than me.
    
    Cheers
    
    Stuart