function getDbHost returns char ( pcLDbName as char ):
define var cParamList as char no-undo.
define var cParam as char no-undo.
define var cHost as char no-undo.
define var cPort as char no-undo.
define var j as int no-undo.
define var i as int no-undo.
assign
cParamList = dbparam( pcLDbName )
j = num-entries( cParamList, " " ). do i = 1 to j:
cParam = entry( i, cParamList, " " ).
if cParam begins "-H" then
cHost = substr( cParam, 4 ).
else
if cParam begins "-S" then
cPort = substr( cParam, 4 ).
end. /* 1 to j */
if cHost = "" then
cHost = "localhost".
return cHost + ( if cPort ne "" then ":" + cPort else "" ).
end function. /* getDbHost */
message getDbHost( "sports2000" ) view-as alert-box.
function getDbHost returns char ( pcLDbName as char ):
define var cParamList as char no-undo.
define var cParam as char no-undo.
define var cHost as char no-undo.
define var cPort as char no-undo.
define var j as int no-undo.
define var i as int no-undo.
assign
cParamList = dbparam( pcLDbName )
j = num-entries( cParamList). do i = 1 to j:
cParam = entry( i, cParamList).
if cParam begins "-H" then
cHost = substr( cParam, 4 ).
else
if cParam begins "-S" then
cPort = substr( cParam, 4 ).
end. /* 1 to j */
if cHost = "" then
cHost = "localhost".
return cHost + ( if cPort ne "" then ":" + cPort else "" ).
end function. /* getDbHost */
message getDbHost( "sports2000" ) view-as alert-box.
Though I do not like Progress, I have a sincere appreciation and respect for all of you and your thoughtful, helping nature.