[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

4253.0. "PTN skips some documents" by VAXRIO::ABREU () Mon Jun 13 1994 22:19

    Hi ,
    
        I have a customer who is trying to transfer an account from one
    machine to another .. both are running ALL-IN-1 V3.0A.
    
        The problem is that when re runs PTN , many documents are skipped
    .. they are in a shared drawer ... but there are some documents in this
    shared drawer that are not skipped. I guess that the documents that are
    not skipped are owned by this user and the others are not owned by him
    .. Is this the correct behaviour ?
    
     Thanks .. Marcia
T.RTitleUserPersonal
Name
DateLines
4253.1Not correctIOSG::TALLETTRoll on Chicago...Wed Jun 15 1994 11:099
    
    	No, this is not correct behaviour. Transfer user decides what
    	to transfer on a drawer by drawer basis, not individual documents.
    	Now, if the user didn't have access to those documents then maybe
    	you are getting an error. Have you checked the logfiles of the
    	PAT?
    
    Regards,
    Paul
4253.2more infoVAXRIO::ABREUThu Jun 16 1994 15:37415
    Hi Paul,
    
        There is no error in the log file .. I'll put part of the log for
    you to have an idea of what is happening there. ALL-IN-1 says that 
    it's skipping the document.
      
         Regs, 
    
                  Marcia
    
$ SET NOVER
$  exit
$ if f$mode() .nes. "INTERACTIVE" then exit
$! OA$LIB:SM_PAT.COM - Prepare accounts for transfer
$! Details to the end of the file
$!---------------------------------------------------------------------
$	save_verify = f$verify(1)
$!==================================================
$!
$	 debug = 1
$!
$!==================================================
$	if debug 
$	then 
$		bck_log = "/LOG"
$	else
$	endif
$!-----------------------------------------------------------------------
$! Set an error trap
$ 	ON SEVERE_ERROR THEN GOTO INVALID_CONDITION
$!
$!PARAMETERS:
$!	P1 : Administrator ID
$!	P2 : Time stamp
$!      P3 : flag info - xfer vms : auto_reply : xfer mode 
$!	P4 : tape name - 0 if network transfer
$!	P5 : tape drive - 0 if network transfer
$!	P6 : string containing parsed transfer name,transfer name and
$!	     saveset_name separated by colons
$!	P7 : target node
$! 	P8 : local node
$!		
$!CONSTANTS:
$!
$! Set disk space requirements (blocks) 
$! Firstly, try and translate the optional logical which can be set by the
$! system manager.
$!
$	space_req = f$trnlnm("OA$TRANSFER_SPACE","LNM$SYSTEM",,"EXECUTIVE")
$	if space_req .eqs. ""
$	then
$	    space_req = 100000
$	else
$	endif
$!
$	wso = "write sys$output"
$	default_language = f$trnlnm("OA$DEFAULT_LANGUAGE")
$!
$! Preset symbols
$	tape = 2
$	network = 1
$	xfer_mode = 1
$	manager_language = default_language
$	admin_language = default_language
$	tape_name = ""
$	tape_drive = ""
$	xfer_name = ""
$	parsed_xfer_name = ""
$	saveset_name = ""
$	mail_subscribers = f$trnlnm("OA$SUBSCRIBER_MAIL")
$	autoreply_vms_file = ""
$	z_status = 0
$	fatal_error = 0
$	subscriber_mail = ""
$	success_log = ""
$	failure_log = ""
$	data_file   = ""
$	tr_mailbox  = ""
$	version = ""
$	arch_status = 0
$	saveset_size == 0
$!	sm_status == 0
$!
$! Save the current directory spec
$! 
$	save_default = f$environment("DEFAULT")		
$!------------------------------------------------------------------
$! Check the parameters
$!
$	admin_id = P1
$ 	if debug then wso "admin account = MANAGER" 
admin account = MANAGER
$!
$! Check p2	
$!
$	timestamp = P2
$       if timestamp .eqs. "" then goto invalid_condition 
$!
$! Check p3
$!
$	flags = P3
$	if flags .eqs. "" then goto invalid_condition 
$!
$	xfer_vms = f$element(0, ":", flags)
$	if xfer_vms .eqs. "" then goto invalid_condition 
$!
$	set_auto = f$element(1, ":", flags)
$	if set_auto .eqs. "" then goto invalid_condition 
$!
$	xfer_mode = f$element(2, ":", flags)
$	if (xfer_mode .ne. 1) .and. (xfer_mode .ne. 2) then goto bad_mode_value	
$	if xfer_mode .eqs. network then goto check_param6
$ check_param6:
$	parsed_xfer_name = f$element(0,":",P6)
$	xfer_name	 = f$element(1,":",P6)
$	saveset_name	 = f$element(2,":",P6)
$!
$! Check p7
$!
$	target_node = p7
$	if xfer_mode .eqs. network .and. target_node .eqs. "" then -
							goto no_target_node 
$!
$! Check p8
$!
$	local_node = p8
$	if local_node .eqs. "" then goto no_local_node 
$	local_node = local_node - ":" 
$!
$!Set Privileges
$! Needs SYSPRV -- first, see if we can get it.
$! Needs OPER priv to allow sending 'broadcast'messages to the Admin.
$! Needs SYSNAM privilege to DEFINE executive mode logical names.
$! Needs READALL to be able to back up files without system read access
$!
$       curr_priv := SYSPRV,EXQUOTA,OPER,VOLPRO,SYSNAM,READALL  
$ 	if .not. f$priv("SYSPRV,EXQUOTA,OPER,VOLPRO,SYSNAM") then -
        goto no_privilege
$! ------------------------------------------------------------------	
$!
$! Create an identity tag for script files from the timestamp
$!
$	tag = f$extract(11, 4, timestamp)
$!
$! Call ALL-IN-1 and check this is a valid ALL-IN-1 user		
$! also get the manager and administrators language
$!
$	script_file = "sys$login:mua_check_admin5086.scp"
$	open/write scp sys$login:mua_check_admin5086.scp
$	write scp "get cli$version = oa$version:4:10"
$	write scp "get cli$admin_dir = profil.direct[""MANAGER""]"
$!
$! Set up the admin flags
$!
$	write scp "get cli$admin_flag = 0"
$	write scp "get cli$admin_priv =0" 
$	write scp "get #temp = profil.ad$min:U[""MANAGER""]"
$	write scp ".if #temp eqs ""Y"" then get cli$admin_flag = 1"
$	write scp "get #temp = sm_policies.vms_accounts:U[""ADMIN""]"
$	write scp ".if #temp eqs ""Y"" then get cli$admin_priv = 1"
$!
$! In case the Managers account has been selected - unlock this
$! unconditionally
$!
$	write scp "write change profil user=""MANAGER"",not$in$use=0"
$!
$! Get the default operating languages for Admin and Manager
$!
$	write scp "get cli$admin_language = profil.language:U[""MANAGER""]"
$	write scp "get cli$manager_language = profil.language:U[""MANAGER""]"
$!
$! Get Admin details
$!
$	write scp "parse_user cli$admin_id "
$	write scp "get cli$parse_user_name = $parse_user_name"
$!
$! Translate the autoreply messages into the system default language
$!
$	write scp "get cli$ptn_reply_text = SA$_BCH_PTN_AUTOREPLY"
$	write scp "get cli$ptt_reply_text = SA$_BCH_PTT_AUTOREPLY"
$!
$! Get details of the transfer account
$!
$	write scp ".exit"
$	close scp
$	allin1/user=manager/noinit/reenter/language=BRAZILIAN
	oa$ini_init

	get oa$function="do " cli$script_file
	exit





	MANAGER terminou de usar o ALL-IN-1 em 12-Jun-1994 10:35

$!
$	delete/noconfirm/nolog sys$login:mua_check_admin5086.scp;
$!
$	if manager_language .eqs. "" then goto no_language
$	if admin_language .eqs. "" then goto no_language
$	if debug then wso "parse_user_name MANAGER"
parse_user_name MANAGER
$!
$! Is this the MANAGER - if not then check that this is an admin and
$! privs for VMS account manipulation have been given	
$!
$  	if admin_id .eqs. "MANAGER" then goto set_flags
$ set_flags:
$!
$! Set the current directory to the transfer area
$!
$! Set an error trap
$ 	ON WARNING THEN GOTO INVALID_XFER_DEVICE
$	set default oa$transfer:[000000]	
$ set noon
$! Set an error trap
$ 	ON SEVERE_ERROR THEN GOTO INVALID_CONDITION
$!
$! Initial check for space available
$!
$	translate = f$trnlnm("oa$transfer")
$	if translate.eqs."" then goto invalid_xfer_device
$	xfer_device = f$element(0, ":", translate) 
$	if .not. f$getdvi(xfer_device, "EXISTS") then goto invalid_xfer_device
$!
$!May exist but unmounted/remotely mounted - check this
$!
$	if .not. f$getdvi(xfer_device, "MNT") then goto invalid_xfer_device
$!
$!May exist but write locked - check this
$!
$	if f$getdvi(xfer_device, "SWL") then goto invalid_xfer_device
$!
$	free_blocks = f$getdvi(xfer_device, "FREEBLOCKS")
$	if free_blocks .lt. space_req then goto no_initial_space
$!
$	if xfer_mode .eq. network then goto create_work_area
$ create_work_area:
$!
$	xfer_area = "oa$transfer:[EAYZ]"
$	create/dir/owner=parent oa$transfer:[EAYZ]
%CREATE-I-EXISTS, OA$TRANSFER:[EAYZ] already exists
$	if .not. $STATUS then goto failed_create_dir
$!
$	if debug then wso "xfer area = oa$transfer:[EAYZ]"
xfer area = oa$transfer:[EAYZ]
$! Create and open the success and failure logs
$!
$	success_log = "oa$transfer:[EAYZ]success5086.wrk"
$	failure_log = "oa$transfer:[EAYZ]failure5086.wrk"
$!
$	open/write/error=unable_create_logfiles ok_log oa$transfer:[EAYZ]success5086.wrk
$	open/write/error=unable_create_logfiles fail_log oa$transfer:[EAYZ]failure5086.wrk
$!
$! Set the success and failure counts 
$!
$	success_count = 0
$	failure_count = 0
$!
$! Create the selection file to be used at the receiving node
$!
$	selection_list = "oa$transfer:[EAYZ]pat_EAYZ.dat"
$	create/fdl=oa$lib:mua_pat_select_file.fdl oa$transfer:[EAYZ]pat_EAYZ.dat
$	if .not. $STATUS then goto select_file_error
$	open/read/write/error=select_file_error sel oa$transfer:[EAYZ]pat_EAYZ.dat
$!
$! Create the header record for the transfer information file
$! General details of the transfer - including originating Admin
$! account name , node and mailbox- allowing return mail
$!
$       tr_mailbox  = f$trnlnm("oa$mti_mailbx")
$	xfer_header = f$fao("!30AS!16AS!6AS!6AS!6AS!1AS!1AS!4AS",-
			 admin_id , timestamp,  local_node , -
			 target_node , tape_name, -
			 xfer_vms, set_auto,version)
$!
$! Create the information file and write the header to it
$!
$	info_filename = "oa$transfer:[EAYZ]EAYZ_info.dat"
$ 	open/write/error=info_file_error tx_file oa$transfer:[EAYZ]EAYZ_info.dat 
$	write/error=info_file_error tx_file xfer_header
$	write/error=info_file_error tx_file tr_mailbox
$!
$!*********************** Keeping info file open
$!	close tx_file
$!
$!---------------------------------------------------------------------------
$! ACCOUNTS LOOP
$! *************
$! Get the details in turn of each account to be transferred 	
$!
$	time_part = f$extract(4,12, timestamp) 
$	admin_part = f$extract(0, 4, parse_user_name)
$	filename = "MUA_" + admin_part + "_" + time_part + "_PAT.DAT"
$!
$	data_file = admin_dir + filename
$!
$	open/read/share/error=pat_account_err pat DISCO$ALLIN1:[ALLIN1.MGR]MUA_MANA_061210350863_PAT.DAT
$!
$ get_next_account:
$!
$ 	read/end_of_file=pat_data_eof/error=pat_account_err pat buffer
$	line = f$edit(buffer,"TRIM")
$	account = f$extract(0, 30, line)
$	account = f$edit(account, "TRIM,COMPRESS")
$	parsed_account = f$extract(30, 30, line)
$	parsed_account = f$edit(parsed_account, "TRIM,COLLAPSE")
$	account_lang = f$extract(60, 60, line)
$	account_lang = f$edit(account_lang,"TRIM") 
$	goto check_for_manager
$ check_for_manager:
$	if account .nes.  "MANAGER" then goto check_space_available
$check_space_available:
$	xfer_dir = f$trnlnm("OA$TRANSFER")
$	xfer_device = f$element(0, ":", xfer_dir)
$	free_blocks = f$getdvi(xfer_device, "FREEBLOCKS")
$	if free_blocks .gt. space_req then goto create_area 
$ create_area:
$	if debug then wso "starting pass for user EAYZ"
starting pass for user EAYZ
$	user_area = "oa$transfer:[EAYZ.EAYZ]"
$	create/dir/owner=parent oa$transfer:[EAYZ.EAYZ]
%CREATE-I-EXISTS, OA$TRANSFER:[EAYZ.EAYZ] already exists
$!
$	document_area = -
		"oa$transfer:[EAYZ.EAYZ.documents]"
$	if f$search("oa$transfer:[EAYZ.EAYZ]*.*;*").eqs."" then goto create_cont
$	if f$search("oa$transfer:[EAYZ.EAYZ.documents]*.*;*") .nes. ""
$	endif
$	set file/prot=(ow:rwed,sy:rwed,gr:rwed,wo:rwed) oa$transfer:[EAYZ.EAYZ]*.*;*
$	delete/noconfirm oa$transfer:[EAYZ.EAYZ]*.*;*/log
%DELETE-I-FILDEL, OA$TRANSFER:[EAYZ.EAYZ]DOCUMENTS.DIR;1 deleted (3 blocks)
%DELETE-I-FILDEL, OA$TRANSFER:[EAYZ.EAYZ]EAYZ.REPLY;1 deleted (3 blocks)
%DELETE-I-TOTAL, 2 files deleted (6 blocks)
$ create_cont:
$	create/dir/owner=parent oa$transfer:[EAYZ.EAYZ.documents]
$!
$! Set up auto-reply document for this account
$!
$	if .not. set_auto then goto prepare_filecab
$!
$	autoreply_vms_file = "oa$transfer:[EAYZ.EAYZ]EAYZ.reply"
$	open/write/error=autoreply_fail reply_message oa$transfer:[EAYZ.EAYZ]EAYZ.reply
$	if xfer_mode .eqs. network
$	then $ message_reply = f$fao(ptn_reply_text, account, target_node)
$	else $ message_reply = f$fao(ptt_reply_text, account)
$	endif
$!
$	write/error=autoreply_fail reply_message message_reply
$	close reply_message
$!
$!--------------------------------------------------------------------------- 
$! PREPARE USER FILECAB
$! ********************
$!
$ prepare_filecab:
$	allin1/noinit/reenter/user=manager/language=BRAZILIAN
	oa$ini_init

	do sm_pat_archive 
Check if EAYZ is logged in...
Open log files...
Locking account...
VMS Username is  EAYZ
UAF directory is [EAYZ]
A1 directory is  USER$SEACE:[EAYZ.A1]
User language is BRAZILIAN
Transfer area is oa$transfer:[EAYZ]
Saving newmail...
NEWDIR to EAYZ
Set auto-reply...
Creating oa$transfer:[EAYZ.EAYZ]MUA$PARTITION.DAT...
Default drawer name is PRINCIPAL
Locking drawer [EAYZ]PRINCIPAL
Processing drawer [EAYZ]PRINCIPAL
Directory spec is USER$SEACE:[EAYZ.A1]
Default drawer flag = Y
SET_DRAWER to [EAYZ]PRINCIPAL
     Skipping document  AUTO_REPLY,010208
     Skipping document  [EAYZ]DIP,010207
     Skipping document  [EAYZ]DIP,010206
     Skipping document  [EAYZ]DIP,010205
     Skipping document  [EAYZ]DIP,010204
     Skipping document  [EAYZ]DIP,010203
     Skipping document  [EAYZ]DIP,010202
     Skipping document  [EAYZ]DIP,010201
     Skipping document  [EAYZ]DIP,010200
     Skipping document  [EAYZ]DIP,010199
     Skipping document  [EAYZ]DIP,010198
     Skipping document  [EAYZ]DIP,010197
     Skipping document  [EAYZ]DIP,010196
     Skipping document  [EAYZ]DIP,010195
     Skipping document  [EAYZ]DIP,010194
     Skipping document  [EAYZ]DIP,010193
     Skipping document  [EAYZ]DIP,010192
     Skipping document  [EAYZ]DIP,010191
     Skipping document  [EAYZ]DIP,010190
     Skipping document  [EAYZ]DIP,010189
     Skipping document  [EAYZ]DIP,010188
     Skipping document  [EAYZ]DIP,010187
     Skipping document  [EAYZ]DIP,010186
     Skipping document  [EAYZ]DIP,010185
     Skipping document  [EAYZ]DIP,010184
     Skipping document  [EAYZ]DIP,010183
     Skipping document  [EAYZ]DIP,010182
     Skipping document  [EAYZ]DIP,010181
     Skipping document  [EAYZ]DIP,010180
     Skipping document  [EAYZ]DIP,010179
     Skipping document  [EAYZ]DIP,010178
     Skipping document  [EAYZ]DIP,010177
     Skipping document  [EAYZ]DIP,010176
     Skipping document  [EAYZ]DIP,010175
     Skipping document  [EAYZ]DIP,010174
     Skipping document  [EAYZ]DIP,010173
     Skipping document  [EAYZ]DIP,010172
                 .....
       Successfully processed  LIDOS,010090
      ....
    Successfully processed  [EAYZ]DIP,007847
4253.3The problem .. I found out !VAXRIO::ABREUThu Jun 16 1994 16:4317
    
    Hi Paul,
    
         I found out what caused this but I don't know if it is a bug or
    not.
    
         The problem is that  the script SM_PAT_DOCUMENT that is called to
    proccess the documents , has a line "IF OA$CURDOC_DELETE == OA$N THEN
    .EXIT" .. The documents that are being skipped can't be deleted, so the
    script exits and skips the document . 
    
    That is the problem .. Is this the correct behaviour ? 
    I mean the customer can't transfer a document that is marked to
     no be deleted ?
    
        Thanks .. Marcia
    
4253.4A bugIOSG::TALLETTRoll on Chicago...Fri Jun 17 1994 16:0431
    
    	Just checked through the code and what you say is correct.
    	I'm afraid this is a bug. The original transfer user code
    	used archiving functions which refuse to process documents
    	with DELETE="N", but this was changed in V3.0 to use new
    	functions which don't have this restriction. There is code
    	in OA$LIB:SM_PAT_SAVE_UNREAD_MAIL.SCP which attempts to
    	set all documents to DELETE="Y" but makes rather a weak
    	attempt at the job, and obviously in your case left some
    	documents with DELETE="N".
    
    	In fact, none of this is needed any more, so to fix the problem
    	just delete that line from oa$lib:sm_pat_document.scp:
    
            .IF OA$CURDOC_DELETE == OA$N THEN .EXIT
    
    	just take it out.
    
    	Alternatively (or in addition) you could run a small script
    	on the user's account:
    
            for cab$ with .delete eqs "N" do -
            get #docx = .%key \\-
            write change cab$ %key = #docx, delete = "Y"
    
    
    	I will report this problem, but it will not make it into the
    	next version currently in fieldtest.
    
    Regards,
    Paul