home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 27 Fixes20 / 27-Fixes20.zip / rexx20a.zip / REXX.TXT < prev    next >
Text File  |  1992-07-09  |  55KB  |  703 lines

  1. There are 4 files in this fix, unZIP them to either a diskette or directory. In order to use these
  2. files, you will need to either copy them to the ROOT directory of the BOOT drive, and then
  3. restart your system, or use the Install diskette and ESC to the A: prompt and replace these
  4. files in your OS2\DLL directory. The changes will then take effect when you reboot your
  5. system.
  6.  
  7. The files in the ZIP files are -
  8.                                                                                 
  9.    REXX.TXT (this file)
  10.    REXX.DLL                                                                     
  11.    REXXAPI.DLL                                                                  
  12.    REXXINIT.DLL                                                                 
  13.    REXXUTIL.DLL                                                                 
  14.                                                                                 
  15. These contain the fixes for APARs PJ03945 and PJ04178, plus the following       
  16. REXXUTIL fixes:
  17.                                                                                 
  18.   "The SysIni function doesn't release allocated storage when the 'ALL:'        
  19.   parameter is used."                                                           
  20.  
  21.   "Stack overflow when Rexx is used from PMREXX"
  22.  
  23.   "Cannot close a session when a Rexx program is running"
  24.                                                                                 
  25. APAR:    PJ04178                                                                
  26.                                                                                 
  27. Title: VALUE FUNCTION RETURNS INCORRECT VALUE                                   
  28.                                                                                 
  29. Problem Description                                                             
  30. The following REXX program produces incorrect output :                          
  31.                                                                                 
  32. /* */                                                                           
  33. Stem. = ''                                                                      
  34. Key = 'AAA'                                                                     
  35. KVal = 'BBB'                                                                    
  36. call Test                                                                       
  37. Stem.!AAA = ''                                                                  
  38. call Test                                                                       
  39. exit                                                                            
  40.                                                                                 
  41. Test:                                                                           
  42. say                                                                             
  43. say 'This should be null: "'Stem.!AAA'"'                                        
  44. Old = value(('Stem.!'Key, KVal)                                                 
  45. say 'This should be null: "'Old'"'                                              
  46. say 'This should be BBB: "'Stem.!AAA'"'                                         
  47. return                                                                          
  48.                                                                                 
  49.  -----------------------------------------------                                
  50. Initializing Stem. = '' should initialize Stem.!AAA to ''.                      
  51. The first time Test is called, in correct output is produced.                   
  52.                                                                                 
  53. ********************                                                            
  54.                                                                                 
  55. APAR:    PJ03945                                                                
  56.                                                                                 
  57. Title: REXX: VALUE(.."OS2ENVIRONMENT"..) TO SET ENV HOSES PIB INFO.             
  58.                                                                                 
  59. Problem Description                                                             
  60.                                                                                 
  61. "RexxStart()" Bug                                                               
  62.                                                                                 
  63. I use RexxStart() from a "C" program to call a REXX procedure. I have           
  64. recently diagnosed a problem where if I set an environment variable in          
  65. this rexx procedure, the called programs environment is corrupted (as           
  66. a "C" "getenv()" call fails to retrieve a variable that is known to             
  67. exist.                                                                          
  68.                                                                                 
  69. Depending on the change to the environment, I sometimes get an invalid          
  70. value returned in the "pib_pchcmd" field from a "DosGetInfoBlocks()"            
  71. call.  This invalid value is the tail part of the new variable value.           
  72. Thinking that the bug may only occur when expanding the size of an              
  73. environment variable or the environment, I tried to shorten the path            
  74. variable, this removed the problem with "pib_pchcmd" being corrupted            
  75. but still caused the "getenv()" to fail.                                        
  76.                                                                                 
  77. Note that the "getenv()" does not always fail, it obviously depends             
  78. on the change.                                                                  
  79.  
  80. REXXUTIL also contains two new REXX WorkPlace Shell functions,
  81. SysSetObjectData and SysDestroyObject.  See the notes on the
  82. REXX WorkPlace Shell functions below.
  83.  
  84. REXX WorkPlace Shell Functions
  85.  
  86. This section contains 4 pieces of information:
  87.                                                                                 
  88. 1) Large block of text containing information that pertains to the subject.     
  89.    (TEXT INFORMATION)                                                           
  90. 2) Sample Rexx code to create a folder and program objects in the folder        
  91.    (FOLDER.CMD)                                                                 
  92. 3) Sample Rexx code to create shadows of objects                                
  93.    (SHADOW.CMD)                                                                 
  94. 4) Sample Rexx code to create a folder, then program object in the folder,      
  95.    then place a shadow of the program object on the desktop.                    
  96.    (FLDSHAD.CMD)                                                                
  97.                                                                                 
  98. ((BEGIN TEXT INFORMATION))                                                      
  99. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   
  100. Using the REXXUTIL SysCreateObject function                                     
  101.                                                                                 
  102. Using V2's REXXUTIL SysCreateObject function one can create various objects;    
  103. like folders, programs, and shadow objects using Rexx. This section for the     
  104. most part includes parameter information which was gathered together from       
  105. various sources of information.                                                 
  106.                                                                                 
  107. -- Help information regarding the SysCreateObject function of REXXUTIL --       
  108.                                                                                 
  109. Function: SysCreateObject                                                       
  110. Syntax:                                                                         
  111. result=SysCreateObject(classname, title, location <,setup>, <,duplicateflag>)   
  112.                                                                                 
  113.  classname:The name of the object class.                                        
  114.                                                                                 
  115.  title:    The object title.                                                    
  116.                                                                                 
  117.  location: The object location.  This can be specified as either a              
  118.            descriptive path (for example, OS/2 System Folder\System             
  119.            Configuration) or a file system path (for example,                   
  120.            C:\bin\mytools).                                                     
  121.                                                                                 
  122.  setup:    A WinCreateObject setup string.                                      
  123.                                                                                 
  124.  duplicateflag: This parameter indicates what action should be taken            
  125.            when the Setup string specifies an object ID, and an object with     
  126.            that object ID already exists. If the setup string does not give     
  127.            an object ID, a duplicate object will be created.                    
  128.                                                                                 
  129.  result    The return code from WinCreateObject. This returns 1 (TRUE) if       
  130.            the object was created and 0 (FALSE) if the object was               
  131.            not created.                                                         
  132.                                                                                 
  133.  Purpose:  Create a new instance of an object class.                            
  134.                                                                                 
  135. --Interesting INI information:-----------------------------------------------   
  136.                                                                                 
  137. If one views the *.RC files located in your bootdrive:\OS2 directory you        
  138. can learn a lot about the various INI settings and folder structure.            
  139. Review INI.RC and INISYS.RC files, they are used to create your OS2.INI         
  140. and OS2SYS.INI files.                                                           
  141.                                                                                 
  142. --SysCreateObject / WinCreateObject------------------------------------------   
  143.                                                                                 
  144. The various fields of the SysCreateObject call map closely with the             
  145. WinCreateObject call.                                                           
  146.  /***************************************************************************/  
  147.  /* This WinCreateObject function creates an instance of object class       */  
  148.  /* pszClassName, with title pszTitle, and places the icon and title in the */  
  149.  /* location referred to by pszLocation.                                    */  
  150.  /***************************************************************************/  
  151.  #define INCL_WINWORKPLACE                                                      
  152.  #include <os2.h>                                                               
  153.                                                                                 
  154.  PSZ      pszClassName;                                                         
  155.  PSZ      pszTitle;                                                             
  156.  PSZ      pszSetupString;                                                       
  157.  PSZ      pszLocation;       /* Folder location */                              
  158.  ULONG    ulFlags;           /* Creation flags */                               
  159.  HOBJECT  Success;           /* Success indicator */                            
  160.                                                                                 
  161.  Success = WinCreateObject(pszClassName,                                        
  162.              pszTitle, pszSetupString,                                          
  163.              pszLocation, ulFlags);                                             
  164.  
  165. -- Help information regarding the SysSetObjectData function of REXXUTIL --
  166.                                                                                 
  167. Function: SysSetObjectData
  168. Syntax:                                                                         
  169. result=SysSetObjectData(name, setup)
  170.                                                                                 
  171.  name:     The object name.  This can be specified as an object id
  172.            (for example <WP_DESKTOP>) or as a fully specified
  173.            file name.
  174.                                                                                 
  175.  setup:    A WinCreateObject setup string.                                      
  176.                                                                                 
  177.  Purpose:  Alter the settings of an existing object.
  178.  
  179. See the description of the SysCreateObject location and setup strings
  180. below for an explanation of the parameters.
  181.  
  182. -- Help information regarding the SysDestroyObject function of REXXUTIL --
  183.                                                                                 
  184. Function: SysDestroyObject
  185. Syntax:                                                                         
  186. result=SysDestroyObject(name)
  187.                                                                                 
  188.  name:     The object name.  This can be specified as an object id
  189.            (for example <WP_DESKTOP>) or as a fully specified
  190.            file name.
  191.                                                                                 
  192.  Purpose:  Destroys an existing object.
  193.  
  194. See the description of the SysCreateObject location parameter
  195. below for an explanation of the object name.
  196.  
  197. --Putting it all together----------------------------------------------------   
  198.                                                                                 
  199. The SysCreateObject parameters are now explained in more detail. (As I          
  200. understand them...)                                                             
  201. Remember Syntax: result = SysCreateObject(classname, title, location <,setup>)  
  202.                                                                                 
  203. classname:                                                                      
  204.   A registered object class defined to the system. Of particular interest are   
  205.   the WPFolder/WPProgram/WPShadow classes. Note using the sample Rexx code      
  206.   included in the SysQueryClassList function help screen one can list all       
  207.   of the registered classes:                                                    
  208.                                                                                 
  209.   call SysQueryClassList "list."                                                
  210.   do i = 1 to list.0                                                            
  211.      say 'Class' i 'is' list.i                                                  
  212.   end                                                                           
  213.                                                                                 
  214. title:                                                                          
  215.   Easy one, the objects title you want to use. If you wish to break the title   
  216.   line use the carat "^" symbol in the title. Ex. 'First line^Second Line'      
  217.                                                                                 
  218. location:                                                                       
  219.   You can see above what the online Help information has in regards to this     
  220.   field. However by looking at the INI.RC file one can see a use of             
  221.   other "locations", such as <WP_DESKTOP>. If this is used as a location        
  222.   then your object will reside on the WorkPlace Shell desktop. If you are       
  223.   creating a folder or program object you should make sure you use the setup    
  224.   string option and give that folder a unique OBJECTID. We'll see how this      
  225.   works later.                                                                  
  226.                                                                                 
  227.   HINTS: Here are some predefined object ids of system folders. Also if you     
  228.          are thinking of placing an object in the Startup Folder <WP_START>,    
  229.          make it a shadow of the object.                                        
  230.          <WP_DESKTOP>   The Desktop.                                            
  231.          <WP_START>     The Startup folder.                                     
  232.          <WP_OS2SYS>    The System folder.                                      
  233.          <WP_TEMPS>     The Templates folder.                                   
  234.          <WP_CONFIG>    The System Setup folder.                                
  235.          <WP_INFO>      The Information folder.                                 
  236.          <WP_DRIVES>    The Drives folder.                                      
  237.          <WP_NOWHERE>   The hidden folder.                                      
  238.                                                                                 
  239. setup:                                                                          
  240.   This field needs the most explaining, and required the most "snooping".       
  241.   The setupstring field contains a series of "keyname=value" pairs separated    
  242.   by semi-colons that change the behavior of an object. Each object class       
  243.   documents its keynames and the parameters it expects to see.                  
  244.                                                                                 
  245. duplicateflag:                                                                  
  246.   There are three possible values for this parameter:                           
  247.   FailIfExists - No object should be created if an object with the              
  248.       given object already exists. This is the default.                         
  249.   ReplaceIfExists - If an object with the given object ID already exists,       
  250.       the existing object should be replaced.                                   
  251.   UpdateIfExists - If an object with the given object ID already exists,        
  252.       the existing object should be updated with the new information.           
  253.   (Only the first character is required/examined)                               
  254.                                                                                 
  255. ALL parameters have safe defaults, so it is never necessary to pass             
  256. unnecessary parameters to an object.                                            
  257.                                                                                 
  258. Setup Strings:                                                                  
  259. --------------                                                                  
  260.   Below are both WPFolder and WPProgram setup string parameters.                
  261.   Their various key names, values and a short description follow                
  262.   each item. The <<xxx>> item is there to give you an idea of what              
  263.   settings "page" you would find this information on.                           
  264.                                                                                 
  265. *********************************                                               
  266. ***WPFolder setup string parms***                                               
  267. *********************************                                               
  268. KEYNAME      VALUE           Description                                        
  269. -----------------------------------------------------------------------------   
  270. <<View>>                                                                        
  271. OPEN         ICON            Open icon view when object is created.             
  272.              TREE            Open tree view when object is created.             
  273.              DETAILS         Open details view when object is created.          
  274. ICONVIEW     s1[,s2,...sn]   Set icon view to specified style(s).               
  275. TREEVIEW     s1[,s2,...sn]   Set tree view to specified style(s).               
  276. DETAILSVIEW  s1[,s2,...sn]   Set details view to specified style(s).            
  277. (styles)     FLOWED          flowed list items                                  
  278.              NONFLOWED       non-flowed list items                              
  279.              NONGRID         non-gridded icon view                              
  280.              NORMAL          normal size icons                                  
  281.              MINI            small icons                                        
  282.              INVISIBLE       no icons                                           
  283.              LINES           lines in tree view                                 
  284.              NOLINES         no lines in tree view                              
  285. <<Background>>                                                                  
  286. BACKGROUND   filename        Sets the folder background. filename is the        
  287.                              name of a file in the \OS2\BITMAP directory        
  288.                              of the boot drive.                                 
  289. <<File>>                                                                        
  290. WORKAREA     YES             Make the folder a Workarea folder                  
  291. <<Window>>                                                                      
  292. MINWIN       HIDE            Views of this object will hide when their          
  293.                              minimize button is selected.                       
  294.              VIEWER          Views of this object will minimize to the          
  295.                              minimized window viewer when their minimize        
  296.                              button is selected.                                
  297.              DESKTOP         Views of this object will minimize to the          
  298.                              Desktop when their minimize button is selected.    
  299. VIEWBUTTON   HIDE            Views of this object will have a hide button       
  300.                              as opposed to a minimize button.                   
  301.              MINIMIZE        Views of this object will have a minimize button   
  302.                              as opposed to a hide button.                       
  303. CONCURRENTVIEW YES           New views of this object will be created every     
  304.                              time the user selects open.                        
  305.              NO              Open views of this object will resurface when      
  306.                              the user selects open.                             
  307. <<General>>                                                                     
  308. ICONFILE     filename        This sets the object's icon.                       
  309. ICONRESOURCE id,module       This sets the object's icon. 'id' is the           
  310.                              identity of an icon resource in the 'module'       
  311.                              dynamic link library (DLL).                        
  312. ICONPOS      x,y             This sets the object's initial icon position.      
  313.                              The x and y values represent the position in       
  314.                              the object's folder in percentage coordinates.     
  315. TEMPLATE     YES             Creates object as a template.                      
  316.              NO              Resets objects template property.                  
  317. -----------------------------------------------------------------------------   
  318.                                                                                 
  319. **********************************                                              
  320. ***WPProgram setup string parms***                                              
  321. **********************************                                              
  322. KEYNAME      VALUE           Description                                        
  323. -----------------------------------------------------------------------------   
  324. <<Program>>                                                                     
  325. EXENAME      filename        Sets the name of the program                       
  326. PARAMETERS   params          Sets the parameters list, which may                
  327.                              include substitution characters                    
  328. STARTUPDIR   pathname        Sets the working directory                         
  329. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   
  330. <<Sessions>>                                                                    
  331. PROGTYPE     FULLSCREEN      Sets the session type to OS/2 full screen          
  332.              PM              Sets the session type to PM                        
  333.              SEPARATEWIN     Sets the session type to WIN-OS2 window            
  334.                              running in a separate VDM.                         
  335.              VDM             Sets the session type to DOS full screen           
  336.              WIN             Sets the session type to WIN-OS2 full screen       
  337.              WINDOWABLEVIO   Sets the session type to OS/2 windowed             
  338.              WINDOWEDVDM     Sets the session type to DOS windowed              
  339.              WINDOWEDWIN     Sets the session type to WIN-OS2 windowed          
  340. MINIMIZED    YES             Start program minimized                            
  341. MAXIMIZED    YES             Start program maximized                            
  342. NOAUTOCLOSE  YES             Leaves the window open upon program termination.   
  343.              NO              Closes the window when the program terminates.     
  344. -DOS Settings-                                                                  
  345. NOTES:                                                                          
  346. - To change these values you use SET keyname=                                   
  347.   Example:   SET DOS_FILES=45;SET DOS_HIGH=1                                    
  348.   Also for some use values of 1 for ON, 0 for off                               
  349.   Example:   SET COM_HOLD=1;     (on, default is off)                           
  350.   To add more than one DOS_DEVICE you need to separate with hex 0A (line-feed)  
  351.   Rexx example:                                                                 
  352.   h0A='0A'X                                                                     
  353.   setup='...;SET DOS_DEVICE=C:\OS2\MDOS\ANSI.SYS'h0A'C:\OS2\MDOS\EGA.SYS...'    
  354.                                                                                 
  355. List of DOS Setting fields                                                      
  356. COM_HOLD                                                                        
  357. DOS_BACKGROUND_EXECUTION                                                        
  358. DOS_BREAK                                                                       
  359. DOS_DEVICE                                                                      
  360. DOS_FCBS                                                                        
  361. DOS_FCBS_KEEP                                                                   
  362. DOS_FILES                                                                       
  363. DOS_HIGH                                                                        
  364. DOS_LASTDRIVE                                                                   
  365. DOS_RMSIZE                                                                      
  366. DOS_SHELL                                                                       
  367. DOS_STARTUP_DRIVE                                                               
  368. DOS_UMB                                                                         
  369. DOS_VERSION                                                                     
  370. DPMI_DOS_API                                                                    
  371. DPMI_MEMORY_LIMIT                                                               
  372. DPMI_NETWORK_BUFF_SIZE                                                          
  373. DPMI_DOS_API                                                                    
  374. EMS_FRAME_LOCATION                                                              
  375. EMS_HIGH_OS_MAP_REGION                                                          
  376. EMS_LOW_OS_MAP_REGION                                                           
  377. EMS_MEMORY_LIMIT                                                                
  378. HW_NOSOUND                                                                      
  379. HW_ROM_TO_RAM                                                                   
  380. HW_TIMER                                                                        
  381. IDLE_SECONDS                                                                    
  382. IDLE_SENSITIVITY                                                                
  383. KBD_ALTHOME_BYPASS                                                              
  384. KBD_BUFFER_EXTEND                                                               
  385. KBD_RATE_LOCK                                                                   
  386. MEM_INCLUDE_REGIONS                                                             
  387. MEM_EXCLUDE_REGIONS                                                             
  388. MOUSE_EXCLUSIVE_ACCESS                                                          
  389. PRINT_TIMEOUT                                                                   
  390. VIDEO_FASTPASTE                                                                 
  391. VIDEO_MODE_RESTRICTION                                                          
  392. VIDEO_ONDEMAND_MEMORY                                                           
  393. VIDEO_RETRACE_EMULATION                                                         
  394. VIDEO_ROM_EMULATION                                                             
  395. VIDEO_SWITCH_NOTIFICATION                                                       
  396. VIDEO_WINDOW_REFRESH                                                            
  397. VIDEO_8514A_XGA_IOTRAP                                                          
  398. XMS_HANDLES                                                                     
  399. XMS_MEMORY_LIMIT                                                                
  400. XMS_MINIMUM_HMA                                                                 
  401. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   
  402. <<Association>>                                                                 
  403. ASSOCFILTER  filters         Sets the filename filter for files                 
  404.                              associated to this program.                        
  405.                              Multiple filters are separated by commas.          
  406. ASSOCTYPE    type            Sets the type of files associated to this          
  407.                              program. Multiple filters are separated            
  408.                              by commas.                                         
  409. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   
  410. <<Window>>                                                                      
  411. MINWIN       HIDE            Views of this object will hide when their          
  412.                              minimize button is selected.                       
  413.              VIEWER          Views of this object will minimize to the          
  414.                              minimized window viewer when their minimize        
  415.                              button is selected.                                
  416.              DESKTOP         Views of this object will minimize to the          
  417.                              Desktop when their minimize button is selected.    
  418. VIEWBUTTON   HIDE            Views of this object will have a hide button       
  419.                              as opposed to a minimize button.                   
  420.              MINIMIZE        Views of this object will have a minimize button   
  421.                              as opposed to a hide button.                       
  422. CONCURRENTVIEW YES           New views of this object will be created every     
  423.                              time the user selects open.                        
  424.              NO              Open views of this object will resurface when      
  425.                              the user selects open.                             
  426. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   
  427. <<General>>                                                                     
  428. ICONFILE     filename        This sets the object's icon.                       
  429. ICONRESOURCE id,module       This sets the object's icon. 'id' is the           
  430.                              identity of an icon resource in the 'module'       
  431.                              dynamic link library (DLL).                        
  432. ICONPOS      x,y             This sets the object's initial icon position.      
  433.                              The x and y values represent the position in       
  434.                              the object's folder in percentage coordinates.     
  435. TEMPLATE     YES             Creates object as a template.                      
  436.              NO              Resets objects template property.                  
  437. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   
  438. <<Misc>>                                                                        
  439. OBJECTID     <name>          This sets the object's identity. The object        
  440.                              id will stay with the object even if it is         
  441.                              moved or renamed. An object id is any unique       
  442.                              string preceded with a '<' and terminated          
  443.                              with a '>'. This may also be a real name           
  444.                              specified as a fully qualified path name.          
  445. HELPPANEL    id              This sets the object's default help panel.         
  446. HELPLIBRARY  filename        This sets the help library.                        
  447. OPEN         SETTINGS        Open settings view when object is created.         
  448.              DEFAULT         Open default view when object is created.          
  449. NODELETE     YES             Will not allow you to delete the object.           
  450. NOCOPY       YES             Will not allow you to make a copy.                 
  451. NOMOVE       YES             Will not allow you to move the object to another   
  452.                              folder, will create shadow on a move.              
  453. NODRAG       YES             Will not allow you to drag the object.             
  454. NOLINK       YES             Will not allow you to create a shadow link.        
  455. NOSHADOW     YES             Will not allow you to create a shadow link.        
  456. NORENAME     YES             Will not allow you to rename the object.           
  457. NOPRINT      YES             Will not allow you to print it.                    
  458. NOTVISIBLE   YES             Will not display the object.                       
  459. -----------------------------------------------------------------------------   
  460.                                                                                 
  461. Good Luck....                                                                   
  462.                                                                                 
  463. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   
  464. ((END TEXT INFORMATION))                                                        
  465.                                                                                 
  466. ((BEGIN REXX CMD SAMPLES))                                                      
  467.                                                                                 
  468. - (FOLDER.CMD)  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   
  469.                                                                                 
  470. /* FOLDER.CMD: Sample code using REXXUTIL's SysCreateObject function    */      
  471. /* Builds a folder on the DeskTop and places some program objects in it.*/      
  472.                                                                                 
  473. /* Load REXXUTIL */                                                             
  474. call rxfuncadd sysloadfuncs, rexxutil, sysloadfuncs                             
  475. call sysloadfuncs                                                               
  476.                                                                                 
  477. /* The basic call is listed next.                                          */   
  478. /* result = SysCreateObject(classname, title, location, setup)             */   
  479.                                                                                 
  480. call SysCls                                                                     
  481. Say '';Say 'Using REXXUTILs to Add a Folder and Program Objects...'             
  482.                                                                                 
  483. Say '';Say 'Press Y to add Test Folder to Desktop...';Say '';                   
  484. parse upper value SysGetKey('NOECHO') with key                                  
  485. If key<>'Y' Then Exit                                                           
  486.                                                                                 
  487. /* All of the routines pass parameters to a subroutine to perform the call */   
  488. classname='WPFolder'                                                            
  489. title='Test Folder'                                                             
  490. location='<WP_DESKTOP>'                                                         
  491. setup='OBJECTID=<TEST_FOLDER>'                                                  
  492. Call BldObj                                                                     
  493.                                                                                 
  494. Say '';Say 'Now go and open up the folder, currently no items are there.'       
  495. Say 'Press ENTER and we will add a few program objects...'                      
  496. key=SysGetKey()                                                                 
  497.                                                                                 
  498. Say 'Place a program object into the folder...';Say '';                         
  499. classname='WPProgram'                                                           
  500. title='SYSLEVEL-FULLSCR'                                                        
  501. location='<TEST_FOLDER>'                                                        
  502. setup='PROGTYPE=FULLSCREEN;EXENAME=\OS2\SYSLEVEL.EXE;OBJECTID=<TEST_SYSL>'      
  503. Call BldObj                                                                     
  504.                                                                                 
  505. classname='WPProgram'                                                           
  506. title='CHKDSK-PM'                                                               
  507. location='<TEST_FOLDER>'                                                        
  508. setup='MINIMIZED=YES;PROGTYPE=PM;EXENAME=\OS2\PMCHKDSK.EXE;OBJECTID=<TEST_PMCK>'
  509. Call BldObj                                                                     
  510.                                                                                 
  511. classname='WPProgram'                                                           
  512. title='SYSLEVEL-VIO'                                                            
  513. location='<TEST_FOLDER>'                                                        
  514. setup='PROGTYPE=WINDOWABLEVIO;EXENAME=\OS2\SYSLEVEL.EXE;OBJECTID=<TEST_SYSLVIO>'
  515. Call BldObj                                                                     
  516.                                                                                 
  517. classname='WPProgram'                                                           
  518. title='MEM-Fullscreen'                                                          
  519. location='<TEST_FOLDER>'                                                        
  520. setup='PROGTYPE=VDM;EXENAME=\OS2\MDOS\MEM.EXE;PARAMETERS=/?;NOAUTOCLOSE=YES;OBJE
  521. Call BldObj                                                                     
  522.                                                                                 
  523. classname='WPProgram'                                                           
  524. title='MEM-WindowVDM'                                                           
  525. location='<TEST_FOLDER>'                                                        
  526. setup='PROGTYPE=WINDOWEDVDM;EXENAME=\OS2\MDOS\MEM.EXE;PARAMETERS=/?;NOAUTOCLOSE=
  527. Call BldObj                                                                     
  528.                                                                                 
  529. Say '';Say 'All done, to remove objects drag to shredder...'                    
  530.                                                                                 
  531. Exit                                                                            
  532.                                                                                 
  533. /* Build Object */                                                              
  534. BldObj:                                                                         
  535. call charout ,'Building: 'title                                                 
  536.                                                                                 
  537. result = SysCreateObject(classname, title, location, setup)                     
  538.                                                                                 
  539. If result=1 Then call charout ,'...   Object created!'                          
  540. Else             call charout ,'...   Not created! Return code='result          
  541.                                                                                 
  542. Say '';                                                                         
  543. Return                                                                          
  544.                                                                                 
  545. - (SHADOW.CMD)  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   
  546.                                                                                 
  547. /* SHADOW.CMD: Sample code using REXXUTIL's SysCreateObject function    */      
  548. /* Builds shadows on the DeskTop and Startup Folder                     */      
  549.                                                                                 
  550. call rxfuncadd sysloadfuncs, rexxutil, sysloadfuncs                             
  551. call sysloadfuncs                                                               
  552.                                                                                 
  553. Call SysCls                                                                     
  554. Say '';Say 'Using REXXUTILs to Add Shadow Objects...'                           
  555.                                                                                 
  556. /* The titles and objectid's are found from the \OS2\INI.RC file */             
  557.                                                                                 
  558. Say '';Say 'First lets place some items on the Desktop...'                      
  559. title='Enhanced Editor'; objid='<WP_EPM>'   ; loc='<WP_DESKTOP>'; call AddShad  
  560. title='OS/2 Window'    ; objid='<WP_OS2WIN>'; loc='<WP_DESKTOP>'; call AddShad  
  561. title='System Clock'   ; objid='<WP_CLOCK>' ; loc='<WP_DESKTOP>'; call AddShad  
  562.                                                                                 
  563. Say '';Say 'You can even make shadow objects of files...'                       
  564. title='CONFIG.SYS'; objid='C:\CONFIG.SYS' ; loc='<WP_DESKTOP>'; call AddShad    
  565.                                                                                 
  566. Say '';Say 'Now lets place an item in the Startup Folder...'                    
  567. title='System Clock'   ; objid='<WP_CLOCK>' ; loc='<WP_START>'  ; call AddShad  
  568.                                                                                 
  569. Say '';Say 'All done, to remove objects drag to shredder...'                    
  570.                                                                                 
  571. Exit                                                                            
  572.                                                                                 
  573. AddShad:                                                                        
  574. Say '';Say 'Press Y to add shadow object: 'title' to 'loc                       
  575. parse upper value SysGetKey('NOECHO') with key                                  
  576. If key='Y' Then Do                                                              
  577.                                                                                 
  578.    result=SysCreateObject('WPShadow', title, loc, 'SHADOWID='objid)             
  579.                                                                                 
  580.    If result=1 Then Say 'Object created'                                        
  581.    Else             Say 'Not created, return code='result                       
  582. End                                                                             
  583. Return                                                                          
  584.                                                                                 
  585. - (FLDSHAD.CMD)  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -    
  586.                                                                                 
  587. /* FLDSHAD.CMD: Sample code using REXXUTIL's SysCreateObject function   */      
  588. /* Builds a folder on the DeskTop places a program object in it then    */      
  589. /* places a shadow of the program object on the DeskTop.                */      
  590.                                                                                 
  591. /* Load REXXUTIL */                                                             
  592. call rxfuncadd sysloadfuncs, rexxutil, sysloadfuncs                             
  593. call sysloadfuncs                                                               
  594.                                                                                 
  595. /* The basic call is listed next.                                          */   
  596. /* result = SysCreateObject(classname, title, location, setup)             */   
  597.                                                                                 
  598. call SysCls                                                                     
  599. Say '';Say 'Using REXXUTILs to Add Folder/Program/Shadow Objects...'            
  600.                                                                                 
  601. Say '';Say 'Press Y to add Test Folder to Desktop...';Say '';                   
  602. parse upper value SysGetKey('NOECHO') with key                                  
  603. If key<>'Y' Then Exit                                                           
  604.                                                                                 
  605. classname='WPFolder'                                                            
  606. title='Test Folder'                                                             
  607. location='<WP_DESKTOP>'                                                         
  608. setup='OBJECTID=<TEST2_FOLDER>'                                                 
  609. Call BldObj                                                                     
  610.                                                                                 
  611. Say '';Say 'Press Y to place a program object into the folder...';Say '';       
  612. parse upper value SysGetKey('NOECHO') with key                                  
  613. If key<>'Y' Then Exit                                                           
  614.                                                                                 
  615. classname='WPProgram'                                                           
  616. title='SYSLEVEL-VIO'                                                            
  617. location='<TEST2_FOLDER>'                                                       
  618. setup='PROGTYPE=WINDOWABLEVIO;EXENAME=\OS2\SYSLEVEL.EXE;OBJECTID=<TEST2_SYSLVIO>
  619. Call BldObj                                                                     
  620.                                                                                 
  621. Say '';Say 'Press Y to place a shadow of the program object on the Desktop...';S
  622. parse upper value SysGetKey('NOECHO') with key                                  
  623. If key<>'Y' Then Exit                                                           
  624.                                                                                 
  625. classname='WPShadow'                                                            
  626. title='SYSLEVEL-VIO'                                                            
  627. location='<WP_DESKTOP>'                                                         
  628. setup='SHADOWID=<TEST2_SYSLVIO>'                                                
  629. Call BldObj                                                                     
  630.                                                                                 
  631. Say '';Say 'All done, to remove objects drag to shredder...'                    
  632.                                                                                 
  633. Exit                                                                            
  634.                                                                                 
  635. /* Build Object */                                                              
  636. BldObj:                                                                         
  637. call charout ,'Building: 'title                                                 
  638.                                                                                 
  639. result = SysCreateObject(classname, title, location, setup)                     
  640.                                                                                 
  641. If result=1 Then call charout ,'...   Object created!'                          
  642. Else             call charout ,'...   Not created! Return code='result          
  643.                                                                                 
  644. Say '';                                                                         
  645. Return                                                                          
  646.                                                                                 
  647. - (STARTDOS.CMD) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  648.                                                                                 
  649. /* STARTDOS.CMD: Sample code using REXXUTIL's SysCreateObject function  */
  650. /* Starts a DOS program using specific DOS VDM settings.  This          */
  651. /* particularly useful for LAN execution that requires NET USE commands.*/
  652. /* This example invokes the PKZIP.EXE utility using a files setting of  */
  653. /* 45                                                                   */
  654.                                                                                 
  655. /* Load REXXUTIL */                                                             
  656. call rxfuncadd sysloadfuncs, rexxutil, sysloadfuncs                             
  657. call sysloadfuncs                                                               
  658.                                                                                 
  659. /* The basic call is listed next.                                          */   
  660. /* result = SysCreateObject(classname, title, location, setup)             */   
  661.  
  662. classname='WPProgram'
  663. title='My DOS Program'
  664. location='<WP_NOWHERE>'                  /* place in invisible folder      */
  665. program='EXENAME=C:\PKZIP.EXE;'          /* DOS program name               */
  666. type='PROGTYPE=WINDOWEDVDM;'             /* type of DOS session (windowed) */
  667. startup='STARTUPDIR=C:\;'                /* startup directory              */
  668. settings='SET DOS_FILES=45;'             /* required DOS settings          */
  669. open='OPEN=DEFAULT;'                     /* open now                       */
  670.  
  671. call SysCreateObject classname, title, location,, 
  672.     program||type||startup||settings||open, 'REPLACE'
  673.                                                                                 
  674.                                                                                 
  675. - (BOOTDOS.CMD) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  676.                                                                                 
  677. /* BOOTDOS.CMD: Sample code using REXXUTIL's SysCreateObject function   */
  678. /* Starts a DOS session, booting from a specific DOS image with         */
  679. /* specific DOS VDM settings.                                           */
  680.                                                                                 
  681. /* Load REXXUTIL */                                                             
  682. call rxfuncadd sysloadfuncs, rexxutil, sysloadfuncs                             
  683. call sysloadfuncs                                                               
  684.                                                                                 
  685. /* The basic call is listed next.                                          */   
  686. /* result = SysCreateObject(classname, title, location, setup)             */   
  687.  
  688. classname='WPProgram'
  689. title='Booted DR DOS'
  690. location='<WP_NOWHERE>'                  /* place in invisible folder      */
  691. program='EXENAME=*;'                     /* DOS program name (use shell)   */
  692. type='PROGTYPE=WINDOWEDVDM;'             /* type of DOS session (windowed) */
  693. image='C:\DRDOS.VM;'                     /* DOS image file                 */
  694.                                          /* required DOS settings          */
  695. settings='SET DOS_BACKGROUND_EXECUTION=ON;'
  696. open='OPEN=DEFAULT;'                     /* open now                       */
  697.  
  698. call SysCreateObject classname, title, location,, 
  699.     program||type||image||settings||open, 'REPLACE'
  700.                                                                                 
  701. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   
  702. ((END REXX CMD SAMPLES))                                                        
  703.