/* --------------------------------------------------------------------------
See Icons Used in REXX Tips & Tricks for a description of this program. The sample cmd uses NETSCDDE.EXE from the XWorkplace package. see Using the samples for how to extract this code.
-------------------------------------------------------------------------- */
/* Dispatcher for calling internet programs from within REXX Tips & Tricks */
/* */
/* Usage: */
/* */
/* rxttwww is called by VIEW.EXE with the following parameters: */
/* */
/* http www_address */
/* news newsgroup */
/* ftp ftp_address */
/* mail mailAddress */
/* cis CISAddress */
/* fido FidoAddress */
/* */
/* Examples: */
/* */
/* rxttwww http www.ibm.com */
/* rxttwww news comp.lang.rexx */
/* rxttwww ftp ftp.ibm.com */
/* rxttwww mail Bernd.Schemmer@gmx.de */
/* rxttwww cis 100104,613 */
/* */
/* */
/* Note: */
/* */
/* */
/* This sample file uses the program NETSCDDE.EXE from the XWorkplace */
/* package. */
/* */
parse arg action iAdress
progDesc = 'rxttwww - Dispatcher for REXX Tips & Tricks'
select
when action = 'http' then
do
/* called to show a web site */
/* ------------------------- */
/* call Netscape using NETSCDDE.EXE from the */
/* XWorkplace package */
'@netscdde.exe -Xn http://' || iAdress
end /* when */
when action = 'ftp' then
do
/* called to show a ftp site */
/* ------------------------- */
/* call Netscape using NETSCDDE.EXE from the */
/* XWorkplace package */
'@netscdde.exe -Xn ftp://' || iAdress
end /* when */
when action = 'news' then
do
/* called to show a newsgroup */
/* -------------------------- */
/* call Netscape using NETSCDDE.EXE from the */
/* XWorkplace package */
'@netscdde.exe -Xn news://' || iAdress
end /* when */
when action = 'mail' then
do
/* called to write an email to an internet address */
/* ----------------------------------------------- */
/* call Netscape using NETSCDDE.EXE from the */
/* XWorkplace package */
'@netscdde.exe -Xn mailto:' || iAdress
end /* when */
when action = 'cis' then
do
/* called to write an email to a CIS address */
/* ----------------------------------------- */
/* convert the CIS address to an internet address */
parse var iAdress part1 ',' part2
iAdress = strip( part1 ) || '.' || strip( part2 ) || '@compuserve.com'
/* call Netscape using NETSCDDE.EXE from the */
/* XWorkplace package */
'@netscdde.exe -Xn mailto:' || iAdress
end /* when */
when action = 'fido' then
do
/* called to write an email to a FIDO address */
/* ------------------------------------------ */
say progDesc
say
say 'Error: I do not know how to handle FIDO addresses!'
say
say 'Press ENTER to exit'
parse pull
end /* when */
otherwise
do
/* called with a unknown keyword */
/* ----------------------------- */
say progDesc
say
say 'Error: Invalid arguments: "' || action iAdress || '"'
say
say 'Press ENTER to exit'
parse pull
end /* otherwise */
end /* select */
'@exit'