# IBM_PROLOG_BEGIN_TAG 
# This is an automatically generated prolog. 
#  
# bos720 src/bos/usr/sbin/snappd/scripts/DoSetPage.pl 1.4 
#  
# Licensed Materials - Property of IBM 
#  
# COPYRIGHT International Business Machines Corp. 2000,2002 
# All Rights Reserved 
#  
# US Government Users Restricted Rights - Use, duplication or 
# disclosure restricted by GSA ADP Schedule Contract with IBM Corp. 
#  
# IBM_PROLOG_END_TAG 
#
# @(#)34        1.4  src/bos/usr/sbin/snappd/scripts/DoSetPage.pl, snapp, bos720 5/31/02 07:51:30
#!/usr/bin/perl -T
$ENV{'PATH'} = '/bin:/usr/bin:/usr/sbin';
#-------------------------------------------------------------
# main
#-------------------------------------------------------------
#----- get the user entered data from the command line
%hshObjectTags=@ARGV;
#----- get new vals
$strPagingSpace = $hshObjectTags{"PagingSpace"};
$strPagingSpace =~ s/\n//g;
$strPagingSpace =~ s/\s+//g;
$strMessage = `/usr/lib/assist/set_pgspace $strPagingSpace 2>&1`;
if ( $? == 0)
{
        $strSetResult = "Results: SUCCESS";
        $strButtons = "2565130";     
}
else
{
        $strSetResult = "Results: FAILED";
        $strButtons = "601013070";
	$strMessage =~ s/\n/,/g;
	open(OUTFILE,">/var/snapp/snapp.message");
	print OUTFILE $strMessage;
	close (OUTFILE);
}
#-----------------------------------------------------------
# output results
#-----------------------------------------------------------
open(OUTFILE, ">/var/snapp/snapp.fres.tmp");
print OUTFILE <
Set Paging Space
150
12
60
45
$strButtons
EOXML
close(OUTFILE);
system("/usr/bin/cp /var/snapp/snapp.fres.tmp /var/snapp/snapp.fres");