SCOUG Logo


Next Meeting: Sat, TBD
Meeting Directions


Be a Member
Join SCOUG

Navigation:


Help with Searching

20 Most Recent Documents
Search Archives
Index by date, title, author, category.


Features:

Mr. Know-It-All
Ink
Download!










SCOUG:

Home

Email Lists

SIGs (Internet, General Interest, Programming, Network, more..)

Online Chats

Business

Past Presentations

Credits

Submissions

Contact SCOUG

Copyright SCOUG



warp expowest
Pictures from Sept. 1999

The views expressed in articles on this site are those of their authors.

warptech
SCOUG was there!


Copyright 1998-2024, Southern California OS/2 User Group. ALL RIGHTS RESERVED.

SCOUG, Warp Expo West, and Warpfest are trademarks of the Southern California OS/2 User Group. OS/2, Workplace Shell, and IBM are registered trademarks of International Business Machines Corporation. All other trademarks remain the property of their respective owners.

The Southern California OS/2 User Group
USA

SCOUG-HELP Mailing List Archives

Return to [ 11 | December | 2001 ]

<< Previous Message <<


Date: Tue, 11 Dec 2001 19:44:12 PST7
From: Harry Chris Motin <hmotin@attglobal.net >
Reply-To: scoug-help@scoug.com
To: scoug-help@scoug.com
Subject: SCOUG-Help: Re: Rexx Script


6
=====================================================
If you are responding to someone asking for help who
may not be a member of this list, be sure to use the
REPLY TO ALL feature of your email program.
=====================================================
This is a multi-part message in MIME format.

Content Type: text/plain

Content-Transfer-Encoding: 7bit

Yes, of course! Attached please find 4 REXX script files: 2 for checkini
and 2 for cleanini. Here's what you must do:

1. Copy the 2 checkini REXX script files to the same directory where
you've placed the checkini.exe program

2. Copy the 2 cleanini REXX script files to the same directory where
you've placed the cleanini.exe program

3. Put a program object on your desktop (or a desired convenient place)
to run the 2 checkini REXX scripts. Complete the "Program" tab the
properties notebook of the program object for checkini as follows:
A. For path and filename put the path to PMREXX.EXE on your system

B. For parameters put: Q/ "....\CHECKINI1.CMD"
The "....\CHECKINI1.CMD" is the path to the CHECKINI1.CMD REXX script
on your machine (note, you need the quotes). The "/Q" parameter (without
quotes) tells PMREXX to automatically close out the session, after
checkini.exe finishes (you do not have to manually close out that
annoying PMREXX window at the end).

4. Put a program object on your desktop, etc., to run the 2 cleanini
REXX scripts. Complete the "Program" tab of its properties notebook as
follows:

A. Path and file name equals your path to PMREXX.EXE

B. For parameters put: Q/ "....\CLEANINI1.CMD"

5. Change lines 73 and 75 in CHECKINI1.CMD to your path where you copied
CHECKINI2.CMD. For example, line 75 now says the following:

Commandline = 'CALL C:\MAINTENANCE\WPTOOLS\CHECKINI2.CMD 'Options

You need to change the "C:\MAINTENANCE\WPTOOLS\CHECKINI2.CMD" portion
that line.

6. Change line 171 in CHECKINI1.CMD to your path where you have the
checkini log file

7. Change line 9 in CHECKINI2.CMD to your path where have checkini.exe

8. Change line 97 in CLEANINI1.CMD to your path where you have
CLEANINI2.CMD

9. Change line 202 in CLEANINI1.CMD to your path where you have the
cleanini log file

10. Change line 9 in CLEANINI2.CMD to your path where have cleanini.exe

You need 2 REXX scripts to run checkini.exe and 2 for cleanini.exe. For
example, for checkini.exe the first script, CHECKINI1.CMD, runs in a
PMREXX session, which is different than a commandline REXX session (I
use PMREXX as a quick and convenient way of bringing up a text window
with prompts so that I can run checkini.exe without having to remember
all of its various parameters). CHECKINI1.CMD calls CHECKINI2.CMD in a
new commandline session. CHECKINI2.CMD in turn runs checkini.exe, which
runs in a commandline session. And similarly with the 2 REXX scripts for
cleanini.exe. I don't believe you can run an OS/2 commandline *.exe
program directly from PMREXX (at least I don't know how to do it!).

When you run checkini.exe you have to follow the directions in the
CHECKINI1.CMD REXX script prompts and go into the OS/2 window list
(press CONTROL-ESCAPE) as the final step to run checkini.exe each time
you run it. Checkini.exe would not run directly from CHECKINI2.CMD.
Instead, I had to use the OS/2 window list (I don't know why).
Cleanini.exe did not have that problem. It runs directly from
CLEANINI2.CMD.

Everything is thoroughly documented with comments and prompts in the 4
REXX scripts. I don't think you'll have any problems. But please let me
know if you do. I be glad to help.
HCMotin

_______________________________________________________________________________________________

"J. R. Fox" wrote:
>
> =====================================================
> If you are responding to someone asking for help who
> may not be a member of this list, be sure to use the
> REPLY TO ALL feature of your email program.
> =====================================================
>
> Harry wrote:
>
> > I run UniMaint, then checkini and finally cleanini. That works really
> > well. It's now become so automatic on my machine, that I wrote a PMREXX
> > program for checkini and one for cleanini. They provide me with a
> > selection menu, so I do not have to go to the commandline and remember
> > the syntax for either program.
>
> Are these available, by any chance ?
>
> Jordan
>
> =====================================================
>
> To unsubscribe from this list, send an email message
> to "steward@scoug.com". In the body of the message,
> put the command "unsubscribe scoug-help".
>
> For problems, contact the list owner at
> "rollin@scoug.com".
>
> =====================================================


Content Type: text/plain

name="CHECKINI1.CMD"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline;
filename="CHECKINI1.CMD"

/*This REXX program provides a PMREXX user interface, GUI, to the checkin=
i.exe program.*/
/*It uses PMREXX to provide a GUI for instructions on running checkini.ex=
e by selecting one or more of */
/*its options. After the user selects one or more options, the program ca=
lls another REXX program,*/
/*C:\MAINTENANCE\WPTOOL\CHECKINI2.CMS, to run the checkini.exe program in=
an OS/2 command window with the*/
/*selected options passed on to checkini.exe*/

/*Begin specifying the desired options for checkini.exe*/
ErrorChance =3D 5
TABLE:
SAY "This REXX program provides a PMREXX graphical user interface, GUI, t=
o the checkini.exe program"
SAY ""
SAY ""
SAY "The following desired commandline options are available for executin=
g checkini.exe:"
SAY ""
SAY " OPTION DESCRIPTION OPTION PARAMETER"
SAY " Write the corrections to the ini-files with confirmations for every=
change. (****) /C"
SAY " Specify a different location for the ini-files that are to be check=
ed. /Path"
SAY " Specify a name for the logfile (the default is CHECKINI.LOG). /=
L:LogFileName"
SAY " Write all the output to the logfile (normally only problems are wri=
tten). /W"
SAY " Write everything (all the output) to the logfile, but only the erro=
rs to the screen. /W:2"
SAY " Write everything to the logfile, but (almost) nothing to the screen=
=2E /W:3"
SAY " Run 'silent' and only write to the errors to the logfile (program r=
uns faster). (****) /S"
SAY " Do not report errors on network drives or removable local drives. =
(****) /R"
SAY " Manually specify the location of the desktop (use only if checkini =
asks for it). /D"
SAY " Auto answer whether or not to correct each problem with a 'YES' (us=
e only with /C). /Y"
SAY " Auto answer ...., with a 'YES' and also no confirmation for any ind=
ividual tests. (****) /Y:2"
SAY " Enable the disk scan function (do not use, if more than 1 OS/2 vers=
ion installed). /T"
SAY " The four (4) preferred options, '/C /S /R /Y:2', the ones with the =
four (4) asterisks /P"
SAY " Show information, or help. /?"
SAY ""
SAY ""
SAY "If you want more than 1 option, separate each one with a space."
SAY "Please select the desired commandline option, or options, as given a=
bove."
PARSE UPPER PULL Options
SAY ""
SAY ""
SELECT
WHEN ErrorChance =3D 0 THEN DO
SAY "You have incorrectly entered the option data 5 times. You will not=
be able to correct"
SAY "any more errors. Instead, this program will now terminate. Please =
try again, this time"
SAY "correctly entering the desired options."
END /*Ends "" Section*/

OTHERWISE DO
CALL ERRORCHECKING
NOP
END /*Ends "OTHERWISE DO" Section*/
END /*Ends "SELECT" Section*/

IF TestFailure =3D "YES" THEN SIGNAL TABLE

/*Begin re-specifying the options in the format that checkini wants and u=
ses*/
Options =3D ""
SELECT
WHEN Part.0 =3D 1 & Part.1 =3D "/P" THEN
Options =3D "/C /S /R /Y:2"

OTHERWISE DO
DO M =3D 1 TO Part.0 BY 1
Options =3D Options" "Part.M
END M /*Ends "DO M =3D 1 TO Part.0 BY 1" Section*/
END /*Ends "OTHERWISE DO" Section*/
END /*Ends "SELECT" Section*/
/*End re-specifying the options in the format that checkini wants and use=
s*/
/*End specifying the desired options for checkini.exe*/

/*Begin calling the CHECKINI2.CMD REXX procedure, which in turn will call=
the checkini.exe program*/
SAY "You must now open the 'CALL C:\MAINTENANCE\WPTOOLS\CHECKINI2.CMD ...=
,' OS/2 command window, using the"
SAY "OS/2 Window List. Next, press the ENTER key in that windown and foll=
ow the instructions from checkini.exe."
Commandline =3D 'CALL C:\MAINTENANCE\WPTOOLS\CHECKINI2.CMD 'Options
INTERPRET "Commandline"
/*End calling the CHECKINI2.CMD REXX procedure, which in turn will call t=
he checkini.exe program*/

/*Begin specifying whether or not you wish to open the checkini log file*=
/
SAY "Please select whether or not you wish to open the checkini log file.=
Enter a 'Y' (or, a 'y') if you"
SAY "want to open the log file. Otherwise, just press the ENTER key."
SAY ""
SAY ""
PARSE UPPER PULL Response
SELECT
WHEN Response =3D "Y" THEN DO
CALL OPENLOGFILE
NOP
END

OTHERWISE NOP
END /*Ends "SELECT" Section*/
/*End specifying whether or not you wish to open the checkini log file*/
FINISH:
EXIT

ERRORCHECKING:
TestFailure =3D "NO"
LogFileName =3D ""
Part. =3D ""
Test. =3D ""
Remaining =3D "Harry"
Selections =3D Options
M =3D 0
DO UNTIL Remaining =3D ""
M =3D M + 1
LogFileNameTest =3D LEFT(Selections,3)
SELECT
WHEN LogFileNameTest =3D "/L:" THEN DO /*Parse the options, when a log =
file name is specified*/
PARSE VAR Selections Part.M Remaining
Selections =3D Remaining
PartLength =3D LENGTH(Part.M)
DesiredLength =3D (PartLength - 3)
LogFileName =3D SUBSTR(Part.M,4,DesiredLength)
Part.M =3D "/L"LogFileName
END /*Ends "WHEN LogFileNameTest =3D "/L:" THEN DO" Section*/
=

OTHERWISE DO /*Parse the options, when a log file is not specified*/
PARSE VAR Selections Part.M Remaining
Selections =3D Remaining
END /*Ends "OTHERWISE DO" Section*/
END /*Ends "SELECT" Section*/
END /*Ends "DO UNTIL Remaining =3D """ Section*/
Part.0 =3D M
DO M =3D 1 TO Part.0 BY 1
Test =3D LEFT(Part.M,1)
SELECT
WHEN Test \=3D "/" THEN DO
ErrorChance =3D (ErrorChance - 1)
TestFailure =3D "YES"
SAY "You did not enter the options correctly. You left out a preceding=
'/' on one or more of the options."
SAY "Please re-enter the desired options correctly. If you do not ente=
r the options correctly, you will"
SAy "have only "ErrorChance "more chances to correct the mistake(s)."
SAY ""
SAY ""
SAY ""
SAY ""
LEAVE
END /*Ends "WHEN Test \=3D "/" THEN DO" Section*/

OTHERWISE NOP
END /*Ends "SELECT" Section*/
END M /*Ends "DO M =3D 1 TO Part.0 BY 1" Section*/
RETURN

OPENLOGFILE:
SAY "You must now open the log file by selecting 'E:EXE', using the OS/2 =
Window List."
SELECT
WHEN LogFileName =3D "" THEN LogFile =3D "CHECKINI.LOG"

OTHERWISE LogFile =3D LogFileName
END /*Ends "SELECT" Section*/
LogFilePath =3D "C:\MAINTENANCE\WPTOOLS\"LogFile
Commandline =3D 'E.EXE "'LogFilePath'"'
INTERPRET "Commandline"
RETURN
=1A


Content Type: text/plain

name="CHECKINI2.CMD"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline;
filename="CHECKINI2.CMD"

/*This REXX program provides a command line user interface to the checkin=
i.exe program*/
/*It accepts option parameters from the C:\MAINTENANCE\WPTOOLS\CHECKINI1.=
CMD program and*/
/*then executes, or calls, checkini.exe with those parameters*/

/*Begin running the checkini.exe program in another OS/2 windowed session=
*/
ARG Options /*Get the value of the argument passed to CHECKINI2.CMD and a=
ssign it to the variable, Options*/
"CD C:\MAINTENANCE\WPTOOLS" /*Change to the C:\MAINTENANCE\WPTOOLS subdi=
rectory*/
Commandline =3D "Checkini.exe "Options /*Start checkini.exe with the sele=
cted options*/
INTERPRET "CommandLine"
/*End running the checkini.exe program in another OS/2 windowed session*/=

EXIT
=1A


Content Type: text/plain

name="CLEANINI1.CMD"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline;
filename="CLEANINI1.CMD"

/*This REXX program provides a PMREXX user interface, GUI, to the cleanin=
i.exe program.*/
/*It uses PMREXX to provide a GUI for instructions on running cleanini.ex=
e by selecting one or more of */
/*its options. After the user selects one or more options, the program ca=
lls another REXX program,*/
/*C:\MAINTENANCE\CLEANINI\CLEANINI2.CMS, to run the cleanini.exe program =
in an OS/2 command window with the*/
/*selected options passed on to cleanini.exe*/

/*Begin specifying the desired options for cleanini.exe*/
ErrorChance =3D 5
TABLE:
SAY "This REXX program provides a PMREXX graphical user interface, GUI, t=
o the cleanini.exe program"
SAY ""
SAY ""
SAY "The following desired commandline options are available for executin=
g cleanini.exe:"
SAY ""
SAY " OPTION DESCRIPTION OPTION PARAMETER"
SAY " No option given. Scan the OS2.INI file and write the problems to th=
e file, CLEANINI.LOG." =

SAY " Make a backup of OS2.INI. Then, write the required corrections to O=
S2.INI. (*****) /C"
SAY " Restart the WorkPlace Shell (WPS) after making corrections to OS2.I=
NI. (*****) /R"
SAY " Use the option parameters specified in the response file /R:Re=
sponseFileName"
SAY " Specify a name for the logfile (the default is CLEANINI.LOG). =
/L:LogFileName"
SAY " Delete all unused WPS folder positions (PM_Workplace:FolderPos). =
/D:FP"
SAY " Delete all unused PM folder content (PM_Abstract:FldrContent). =
/D:FC"
SAY " Delete unnecessary PMWP_ASSOC_TYPE, PMWP_ASSOC_FILTER, PMWP_ASSOC_C=
HECKSUM and PM_Workplace:Startup. /D:M"
SAY " Delete all (equivalent to the parameters: '/D:FP /D:FC /D:M). (***=
**) /D:A"
SAY " Scan multiple times so that all unnecessary handles can be deleted.=
(*****) /M"
SAY " Delete handles of all remote files. (*****) /RFD"
SAY " Ignore handles of all remote files. /RFI"
SAY " Change the number of columns on the screen to M (in a VIO window on=
ly). /COLS:M"
SAY " Change the number of rows on the screen to N (in a VIO window only)=
=2E /ROWS:N"
SAY " Do not display a logo. /NOLOGO"
SAY " Force a backup if the '/C' option is not specified. /BACKUP"
SAY " Restore the OS2.INI from the most recent backup. /RESTORE"
SAY " The five (5) preferred options, '/C /R /D:A /M /RFD', the ones with=
the five (5) asterisks /P"
SAY " Show information, or help. /?"
SAY ""
SAY ""
SAY "If you want more than 1 option, separate each one with a space."
SAY "Please select the desired commandline option, or options, as given a=
bove."
PARSE UPPER PULL Options
SAY ""
SAY ""
SELECT
WHEN ErrorChance =3D 0 THEN DO
SAY "You have incorrectly entered the option data 5 times. You will not=
be able to correct"
SAY "any more errors. Instead, this program will now terminate. Please =
try again, this time"
SAY "correctly entering the desired options."
END /*Ends "" Section*/

OTHERWISE DO
CALL ERRORCHECKING
NOP
END /*Ends "OTHERWISE DO" Section*/
END /*Ends "SELECT" Section*/

IF TestFailure =3D "YES" THEN SIGNAL TABLE

/*Begin re-specifying the options, using the same parameters that cleanin=
i wants and uses*/
SELECT
WHEN Part.0 =3D 1 & Part.1 =3D "/P" THEN
Options =3D "/C /RESTART /DELALL /MULTIPASS /REMOTE:DELETE"

OTHERWISE DO
DO M =3D 1 TO Part.0 BY 1
SELECT
WHEN Part.M =3D "/R" THEN Part.M =3D "/RESTART"
WHEN Part.M =3D "/D:FP" THEN Part.M =3D "/DELFLDPOS"
WHEN Part.M =3D "/D:FC" THEN Part.M =3D "/DELFLDCONT"
WHEN Part.M =3D "/D:M" THEN Part.M =3D "/DELMISC"
WHEN Part.M =3D "/D:A" THEN Part.M =3D "/DELALL"
WHEN Part.M =3D "/M" THEN Part.M =3D "/MULTIPASS"
WHEN Part.M =3D "/RFD" THEN Part.M =3D "/REMOTE:DELETE"
WHEN Part.M =3D "/RFI" THEN Part.M =3D "/REMOTE:IGNORE"
WHEN Part.M =3D "/NOLOGO" THEN Part.M =3D "/LOGDEL"
WHEN Part.M =3D "/BACKUP" THEN Part.M =3D "/BACK"
WHEN Part.M =3D "/RESTORE" THEN Part.M =3D "/REST"
OTHERWISE NOP
END /*Ends "SELECT" Section*/
END M /*Ends "DO M =3D 1 TO Part.0 BY 1" Section*/

Options =3D ""
DO M =3D 1 TO Part.0 BY 1
Options =3D Options" "Part.M
END M /*Ends "DO M =3D 1 TO Part.0 BY 1" Section*/
END /*Ends "OTHERWISE DO" Section*/
END /*Ends "SELECT" Section*/
/*End re-specifying the options, using the same parameters that cleanini =
wants and uses*/
/*End specifying the desired options for cleanini.exe*/

/*Begin calling the CLEANINI2.CMD REXX procedure, which in turn will call=
the cleanini.exe program*/
Commandline =3D 'CALL C:\MAINTENANCE\CLEANINI\CLEANINI2.CMD 'Options
INTERPRET "Commandline"
/*End calling the CLEANINI2.CMD REXX procedure, which in turn will call t=
he cleanini.exe program*/

/*Begin specifying whether or not you wish to open the cleanini log file*=
/
SAY "Please select whether or not you wish to open the cleanini log file.=
Enter a 'Y' (or, a 'y') if you"
SAY "want to open the log file. Otherwise, just press the ENTER key."
SAY ""
SAY ""
PARSE UPPER PULL Response
SELECT
WHEN Response =3D "Y" THEN DO
CALL OPENLOGFILE
NOP
END

OTHERWISE NOP
END /*Ends "SELECT" Section*/
/*End specifying whether or not you wish to open the cleanini log file*/
FINISH:
EXIT

ERRORCHECKING:
TestFailure =3D "NO"
LogFileName =3D ""
Part. =3D ""
Test. =3D ""
Remaining =3D "Harry"
Selections =3D Options
M =3D 0
DO UNTIL Remaining =3D ""
M =3D M + 1
FileNameTest =3D LEFT(Selections,3)
SELECT
WHEN FileNameTest =3D "/L:" THEN DO /*Parse the options, when a log fil=
e name is specified*/
PARSE VAR Selections Part.M Remaining
Selections =3D Remaining
PartLength =3D LENGTH(Part.M)
DesiredLength =3D (PartLength - 3)
LogFileName =3D SUBSTR(Part.M,4,DesiredLength)
Part.M =3D "/LOG:"LogFileName
END /*Ends "WHEN LogFileNameTest =3D "/L" THEN DO" Section*/

WHEN FileNameTest =3D "/R:" THEN DO /*Parse the options, when a respons=
e file name is specified*/
PARSE VAR Selections Part.M Remaining
Selections =3D Remaining
PartLength =3D LENGTH(Part.M)
DesiredLength =3D (PartLength - 3)
ResponseFileName =3D SUBSTR(Part.M,4,DesiredLength)
Part.M =3D "/RESP:"ResponseFileName
END /*Ends "WHEN LogFileNameTest =3D "/L" THEN DO" Section*/

OTHERWISE DO /*Parse the options, when a log file is not specified*/
PARSE VAR Selections Part.M Remaining
Selections =3D Remaining
END /*Ends "OTHERWISE DO" Section*/
END /*Ends "SELECT" Section*/
END /*Ends "DO UNTIL Remaining =3D """ Section*/
Part.0 =3D M
DO M =3D 1 TO Part.0 BY 1
Test =3D LEFT(Part.M,1)
SELECT
WHEN Test \=3D "/" THEN DO
ErrorChance =3D (ErrorChance - 1)
TestFailure =3D "YES"
SAY "You did not enter the options correctly. You left out a preceding=
'/' on one or more of the options."
SAY "Please re-enter the desired options correctly. If you do not ente=
r the options correctly, you will"
SAy "have only "ErrorChance "more chances to correct the mistake(s)."
SAY ""
SAY ""
SAY ""
SAY ""
LEAVE
END /*Ends "WHEN Test \=3D "/" THEN DO" Section*/

OTHERWISE NOP
END /*Ends "SELECT" Section*/
END M /*Ends "DO M =3D 1 TO Part.0 BY 1" Section*/
RETURN

OPENLOGFILE:
SAY "You must now open the log file by selecting 'E:EXE', using the OS/2 =
Window List."
SELECT
WHEN LogFileName =3D "" THEN LogFile =3D "CLEANINI.LOG"

OTHERWISE LogFile =3D LogFileName
END /*Ends "SELECT" Section*/
LogFilePath =3D "C:\MAINTENANCE\CLEANINI\"LogFile
Commandline =3D 'E.EXE "'LogFilePath'"'
INTERPRET "Commandline"
RETURN
=1A


Content Type: text/plain

name="CLEANINI2.CMD"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline;
filename="CLEANINI2.CMD"

/*This REXX program provides a command line user interface to the cleanin=
i.exe program*/
/*It accepts option parameters from the C:\MAINTENANCE\CLEANINI\CLEANINI1=
=2ECMD program and*/
/*then executes, or calls, cleanini.exe with those parameters*/

/*Begin running the cleanini.exe program in another OS/2 windowed session=
*/
ARG Options /*Get the value of the argument passed to CLEANINI2.CMD and a=
ssign it to the variable, Options*/
"CD C:\MAINTENANCE\CLEANINI" /*Change to the C:\MAINTENANCE\CLEANINI sub=
directory*/
Commandline =3D "Cleanini.exe "Options /*Start cleanini.exe with the sele=
cted options*/
INTERPRET "CommandLine"
/*End running the cleanini.exe program in another OS/2 windowed session*/=

EXIT
=1A


<< Previous Message <<

Return to [ 11 | December | 2001 ]



The Southern California OS/2 User Group
P.O. Box 26904
Santa Ana, CA 92799-6904, USA

Copyright 2001 the Southern California OS/2 User Group. ALL RIGHTS RESERVED.

SCOUG, Warp Expo West, and Warpfest are trademarks of the Southern California OS/2 User Group. OS/2, Workplace Shell, and IBM are registered trademarks of International Business Machines Corporation. All other trademarks remain the property of their respective owners.