Passing A parameter To Unix

brianmu

New Member
I need assistance with passing a parameter for Progress 8 to
Unix. I would like to verify a logon id against a char value stored in a database table and then pass on the logon id to Unix so that the number of current logon sessions can be established. The reason restrict users from having more sessions that necessary.

Sample Code:

input through
who -u| grep -w brian | wc -l NO-ECHO.
set wResult.

The integer value wresult is then compared against a prestored value of the maximum logon sessions that are allowed per user. If the the maximum is reached access is denied. The problem is passing the char "brian" to Unix.


I will be very grateful if you manage to assist.
 

bendaluz2

Member
Try this

def var cUser as char no-undo.

assign cUser = UserTable.UsernameField.

input through value("who -u| grep -w " + cUser + " | wc -l") NO-ECHO.
set wResult.

Hope this works
:)
 
Top