IBM OS/2 LAN Server REXX Utility DLL


Inf-HTML [About][Toc][Index] 0.9b (c) 1995 Peter Childs


NETAPP Get Info


The function retrieves information about an application.   
Syntax 

MyRc = NetGetInfo(NETAPP, 'AppInfo', SrvName, Application)
MyRc = NetGetInfo(NETAPP, 'AppInfo', SrvName, Application, UserId)

  
Parameters 
The function call can be either with four or five parameters. 
The parameters specified are: 
'AppInfo'   The REXX variable receiving the result. The variable is 
            divided into: 
   o AppInfo.name 
     The application name 
   o AppInfo.remark 
     The application remark 
   o AppInfo.command 
     The command that starts the application 
   o AppInfo.command_parms 
     The application start parameters 
   o AppInfo.app_alias_or_drv 
     The alias or drive where the application resides. It specifies a 
     drive letter, followed by a colon (:), if the application resides on 
     the user's local machine or it specifies an existing alias if the 
     application resides on a server 
   o AppInfo.app_drive 
     Applies to DOS public applications only. It is used to specify the 
     drive that is current when the application runs. A value of * 
     indicates that the system should choose a drive letter 
   o AppInfo.app_path_to_dir 
     The remaining path to the application 
   o AppInfo.wrkdir_alias_or_drv 
     Specifies the directory that is made current when the application 
     runs. If the working directory is on the local machine, it specifies 
     the drive, where the directory is located. If the working directory 
     is remote, it specifies an existing alias where the directory is 
     located 
   o AppInfo.wrkdir_drive 
     Specifies the drive that the working directory is to be assigned to 
     when the application is started. A value of * indicates that the 
     system should choose a drive when the application is started 
   o AppInfo.wrkdir_path_to_dir 
     The remaining path to the working directory 
   o AppInfo.prompt 
     Prompt for parameters 
   o AppInfo.interface 
     The interface type 
   o AppInfo.type 
     The application type 
   o AppInfo.res_count 
     The number of application resource list that follows. A value of zero 
     indicates that the application does not require any redirected 
     devices when it runs 
   o AppInfo.i.arl_alias 
     The alias for the resource required by the application. The variable 
     i has a value from 1 to AppInfo.res_count 
   o AppInfo.i.arl_device 
     The device assigned to the resource specified. The variable i has a 
     value from 1 to AppInfo.res_count 
SrvName     The server computer name 
Application The application name 
UserId      The userid. The userid must be specified for private 
            applications 
  
Note 
The server computer name can be specified as '' for a local server. 
Using UserId = '' is identical to calling NetGetInfo(NETAPP) without the 
UserId parameter. 
Example   

/* Get application information */
call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
call LoadLsRxutFuncs

NETAPP      = 30
SrvName     = '\\ILIDC'
Application = 'THENEW'

MyRc = NetGetInfo(NETAPP, 'AppInfo', SrvName, Application)

if myRc <> '0' then do
 say 'Got error from NetGetInfo() ' myRc
 call DropLsRxutFuncs
 exit 9
end

say 'App Name:                ' AppInfo.name
say 'App Remark:              ' AppInfo.remark
say 'App Command:             ' AppInfo.command
say 'App Command parms:       ' AppInfo.command_parms
say 'App alias or drive:      ' AppInfo.app_alias_or_drv
say 'App drive:               ' AppInfo.app_drive
say 'App path to dir:         ' AppInfo.app_path_to_dir
say 'App wrkdir alias or drv: ' AppInfo.wrkdir_alias_or_drv
say 'App wrkdir drive:        ' AppInfo.wrkdir_drive
say 'App wrkdir path to dir:  ' AppInfo.wrkdir_path_to_dir
say 'App prompt:              ' AppInfo.prompt
say 'App interface type:      ' AppInfo.interface
say 'App type:                ' AppInfo.apptype
say 'App resource count:      ' AppInfo.res_count

if AppInfo.res_count <> 0 then do

 do i=1 to AppInfo.res_count
  say
  say "Alias: " AppInfo.i.arl_alias
  say "Device:" AppInfo.i.arl_device
 end

end

call DropLsRxutFuncs
call RxFuncDrop 'LoadLsRxutFuncs'

exit 0

  
Example Output   

App Name:                 THENEW
App Remark:               The New application
App Command:              myapp.exe
App Command parms:
App alias or drive:       C:
App drive:                N/A
App path to dir:          \
App wrkdir alias or drv:  D:
App wrkdir drive:         Local
App wrkdir path to dir:   \
App prompt:               Prompt user for parameters
App interface type:       Presentation Manager
App type:                 Public OS/2 application
App resource count:       2

Alias:  BOOKS
Device: *

Alias:  MYDEMO
Device: U



Inf-HTML End Run - Successful