To all,
I've had an ongoing problem, my MPEXL_SYSTEM_VOLUME_SET keeps getting
dangerously full. So I need a script to search and optionally move
groups from the System volume set to the correct application volume set.
I intended to write a quick an dirty M.P.E. CI Script. I decided to make
use of the MPEX 'keepamdates' parm, making it a MPEX script. MPEX is
doing something odd though. It seems to be starting CI.PUB.SYS as a
child process, and sending the 'newgroup commands to CI.PUB.SYS as
input. This is not a problem to me, what-ever it takes right? The
problem is MPEX is putting a bad character in front of the newgroup
command, WHY?
I don't have clue! Any help will greatly appreciated, and thanks in
advance!
Michael Anderson,
Spring ISD,
Houston Texas.
The script:
:help clnsysvs
USER DEFINED COMMAND FILE: CLNSYSVS.UTIL.SYS
Parm application_account
Setvar apact '!application_account'
#-------------------------------------
# NOTE: This CI Script requires VeSoft MPEX.
# The MPEX dependent code is 'keepamdates'
#
# Author Michael Anderson 2004/01.
#-------------------------------------
Purge tempio > $null
Purge tempio,temp > $null
Setvar hpautocont true
Build tempio;rec=-80,1,f,ascii;disc=100000;temp;msg
File xin=tempio,oldtemp;acc=in;gmulti
File xout=tempio,oldtemp;acc=append
Listgroup @.@;format=brief > *xout
Setvar eof finfo('*xin','eof')
# ------------------------------
# LISTGROUP;FORMAT=BRIEF writes to *xout
# in standard M.P.E. syntax: (Group.Account)
#
# Below we need to change the M.P.E. syntax to
# POSIX HFS syntax (/Account/Group). To do this
# I use the gx and gy pointers to represent the
# first char and last char in the group name, and
# likewise ax and ay for the account name.
#--------------------------------
While !eof > 0 do
Setvar eof !eof - 1
Input record < *xin
Setvar gx 1
Setvar gy pos('.','!record') -1
Setvar ax !gy + 2
Setvar ay ((pos(' ','!record') -1) * -1)
Setvar mygrp str('!record',gx,gy)
Setvar myact str('!record',ax,ay)
Setvar myvol finfo('/!myact/!mygrp',35)
If pos('!apact','!myact') > 0 then
If pos('MPEXL','!myvol') > 0 then
Echo Group !mygrp of the !myact account was found
Echo on the !myvol volume set.
Echo
Echo Do you want to move it,
Input answer;prompt='(Y/N)? '
If '!answer' = 'Y' then
Input mynewvs;prompt='New volume set? '
Copy @.!mygrp.!myact,@.trans;keepamdates
Purgegroup !mygrp.!myact;onvs=!myvol
Purgegroup !mygrp.!myact
Newgroup !mygrp.!myact;access=(r,w,l,a,s,x:ac);cap=ia,ba,ds,ph
Newgroup !mygrp.!myact;onvs=!mynewvs
Altgroup !mygrp.!myact;homevs=!mynewvs
Copy @.trans, @.!mygrp.!myact;keepamdates
Purge @.trans
Endif
Endif
Endif
Endwhile
The execution of the script:
CLNSYSVS VISTA
Group FCSP046 of the VISTA account was found
on the MPEXL_SYSTEM_VOLUME_SET volume set.
Do you want to move it,
(Y/N)? Y
New volume set? STUDENT_VOLUME_SET
-----Copying BLOCKS.FCSP046.VISTA => BLOCKS.TRANS
-----Copying CONTRL.FCSP046.VISTA => CONTRL.TRANS
-----Copying COURSES.FCSP046.VISTA => COURSES.TRANS
-----Copying FCSORT.FCSP046.VISTA => FCSORT.TRANS
-----Copying MSF.FCSP046.VISTA => MSF.TRANS
-----Copying REQUESTS.FCSP046.VISTA => REQUESTS.TRANS
-----Copying ROOMS.FCSP046.VISTA => ROOMS.TRANS
-----Copying RQS.FCSP046.VISTA => RQS.TRANS
-----Copying STUDENTS.FCSP046.VISTA => STUDENTS.TRANS
-----Copying TEACHERS.FCSP046.VISTA => TEACHERS.TRANS
-----Copying TEAMS.FCSP046.VISTA => TEAMS.TRANS
:purgegroup FCSP046.VISTA ;onvs=mpexl_system_volume_set
Purgegroup FCSP046.VISTA ([Q]uit,[Y]es,[No])? Y
Groups purged from system volumeset: 0
Groups purged from user volumesets : 0
Executing DELETEVAR _PG_@
No match found for this variable set. (CIWARN 8116)
:purgegroup FCSP046.VISTA
Purgegroup FCSP046.VISTA ([Q]uit,[Y]es,[No])? Y
Groups purged from system volumeset: 1
Groups purged from user volumesets : 0
Executing DELETEVAR _PG_@
No match found for this variable set. (CIWARN 8116)
MPE/iX CI C.16.01 Copyright (C) Hewlett-Packard 1987. All Rights
Reserved.
WARNING-This computer system is to be accessed only by those
users who have been authorized to do so. Anyone who gains
access to this computer system through an unauthorized manner,
or who knowingly gives passwords to an unauthorized person for
the purpose of gaining access to this computer system, will be
subject to discipline and/or legal action in accordance with
District Policy and State Law.
**********************************************************
REMINDER REMINDER REMINDER REMINDER
* PLEASE DO NOT LEAVE YOUR COMPUTER LOGGED ON *
* AND UNSECURED. EXIT THE SOFTWARE WHEN YOU LEAVE. *
* PLEASE PLEASE PLEASE PLEASE *
**********************************************************
MAKE IT A W O N D E R F U L DAY OF SCHOOL ! ! !
:'newgroup FCSP046.VISTA
;access=(r,w,l,a,s,x:ac);cap=ia,ba,ds,ph;parm=3
Invalid first character in command name. (CIERR 9090)
:
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|