home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 8 Other
/
08-Other.zip
/
ma9609.zip
/
OS2PIcon.Cmd
next >
Wrap
OS/2 REXX Batch file
|
1995-04-29
|
3KB
|
81 lines
/***************************************************************************/
/* OS2PIcon.Cmd */
/* */
/* Creates an icon for the OS/2 Periodical Database */
/* */
/* Revisions: */
/* 04/29/95 1.0 - Changed name of database to OS/2 Periodical Database.*/
/* 09/07/94 1.0 - Created. */
/***************************************************************************/
objectid = '<OS2PUBDB>'
/* Load REXX Utility Functions */
if AddRexxUtil( 'SysCreateObject' ) then signal ERROR
if AddRexxUtil( 'SysSetObjectData' ) then signal ERROR
/* Get arguments */
parse upper arg path location extra
/* If no path or "." specified, use current directory */
if path = '' then
path = '.'
if path = '.' then
path = directory()
/* If no location specified, put it on the desktop */
if location = '' then
location = '<WP_DESKTOP>'
/* Create the program object */
classname = 'WPProgram'
title = 'OS/2 Periodical^Database'
setup = 'OBJECTID='objectid';' || ,
'EXENAME=VIEW.EXE;' || ,
'PARAMETERS='path'\OS2PUBS.INF ABOUT;' || ,
'ICONFILE='path'\OS2PUBS.ICO;' || ,
'PROGTYPE=PM;'
result = SysCreateObject( classname, title, location, setup, 'f' )
if result = 1 /* created */ then
say 'Program object created'
else do
/* See if object already exists */
result = SysSetObjectData( objectid, setup )
if result = 1 /* updated */ then
say 'Program object already exists'
else do
say 'Unable to create program object'
signal ERROR
end /* Do */
end /* Do */
/* Exit the REXX procedure */
exit x2d(0000)
ERROR:
exit x2d(1604)
/* AddRexxUtil procedure */
AddRexxUtil: procedure
parse arg name
if RxFuncQuery( name ) \= 0 /* not registered */ then do
if RxFuncAdd( name, 'RexxUtil', name ) \= 0 /* not successful */ then do
say 'Unable to register REXX Utility Function' name
return 1 /* failure */
end /* Do */
end /* Do */
return 0 /* success */