home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 18 REXX
/
18-REXX.zip
/
sirexx.zip
/
REXXSAMP.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1994-07-25
|
7KB
|
117 lines
/******************************************************************************/
/* SAMPLE REXXSAMP.CMD */
/* */
/* ABSTRACT: */
/* -------- */
/* This file a part of a package made available free to all paying Software */
/* Installer customers. This package comprises of a .DLL that contains */
/* entry points for the Software Installer functions getvar and putvar. */
/* The package also includes a sample using these functions. */
/* */
/* COPYRIGHT: */
/* ---------- */
/* Copyright (C) International Business Machines Corp., 1991, 1994. */
/* */
/* DISCLAIMER OF WARRANTIES: */
/* ------------------------- */
/* The following [enclosed] code is sample code created by IBM */
/* Corporation. This sample code is not part of any standard IBM product */
/* and is provided to you solely for the purpose of assisting you in the */
/* development of your applications. The code is provided "AS IS", */
/* without warranty of any kind. IBM shall not be liable for any damages */
/* arising out of your use of the sample code, even if they have been */
/* advised of the possibility of such damages. */
/******************************************************************************/
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
/* Note: */
/* */
/* In order for this package to work properly you must rename the */
/* EPFIREXX.DLL to match your prefix. To rename this .DLL, issue the */
/* command EPFRCOPY EPFIREXX.DLL ABC where ABC is your 3 letter prefix. */
/* EPFRCOPY.EXE is installed in the C:\IBB\BIN directory when you install */
/* Software Installer. */
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
/* */
Trace on
/******************************************************************/
/* Add functions */
/* */
/* To call an external function from a REXX program, you must */
/* load the functions. This is done through the REXX */
/* rxfuncadd function. */
/* */
/* The 2 external functions are putvar and getvar. */
/******************************************************************/
x = rxfuncadd(putvar,EPFIREXX,putvar) /* entry points from the DLL */
x = rxfuncadd(getvar,EPFIREXX,getvar) /* entry points from the DLL */
/******************************************************************/
/* Following is an example call to getvar. */
/* */
/* The syntax of getvar is as follows: */
/* (See the Software Installer Reference for complete */
/* documentation on getvar) */
/* Parameter 1: A REXX string indicating the name of the */
/* installation variable, whose value you */
/* wish to retrieve. */
/* Parameter 2: The buffer to retrieve the value. */
/* After the call to getvar, this buffer will */
/* contain the value of the installation */
/* variable specifies by the first parameter. */
/* installation variable, whose value you */
/* wish to retrieve. */
/* Parameter 3: The length of the buffer you specify in */
/* the second parameter. */
/* */
/* Get value of EPFIACTION installation variable */
/* (Software Installer has already set this installation */
/* variable) */
/******************************************************************/
buflen = 24
rc = getvar("EPFIACTION", buffer, "buflen")
say 'getvar indicates current action is : ' buffer
say 'Buffer length is : ' buflen
say ''
/******************************************************************/
/* Query user for their name */
/******************************************************************/
say '=============================================================='
say 'Enter your name :'
pull name .
say ''
/******************************************************************/
/* Following is an example call to putvar. */
/* */
/* The syntax of putvar is as follows: */
/* (See the Software Installer Reference for complete */
/* documentation on putvar) */
/* Parameter 1: A REXX string indicating the name of the */
/* installation variable, whose value you */
/* wish to set. */
/* Parameter 2: The buffer containing the value to set. */
/* */
/* Set value of MYREXXVAR to name entered */
/******************************************************************/
rc = putvar("MYREXXVAR", name)
say '=============================================================='
say 'Called putvar() to set MYREXXVAR to: ' name
say 'Return Code of putvar() is : ' rc
say ''
say ''
'@pause'
/******************************************************************/
/* Drop functions */
/* */
/* Drop the external functions through the REXX rxfuncdrop */
/* function. */
/******************************************************************/
x = rxfuncdrop(putvar)
x = rxfuncdrop(getvar)