Problem:
User wants to accept parameters from the command-line
Resolution:
Note: The complete example is attached and available under the "Related" tab.
INTRODUCTION
============
This example illustrates how you can acquire parameters coded at the
command prompt by using the "COMMAND-LINE" function-name.
C:\\FOLDERNAME>CLPARMS.EXE MONTH-END<Enter>
At the "C:\\FOLDERNAME>" prompt, the "CLPARMS>EXE" program name has been
typed followed by the "MONTH-END" parameter.
The "COMMAND-LINE" function-name can be used as the second operand of
an accept statement to collect whatever has been typed following the
program name at the command prompt.
accept parameterValue from COMMAND-LINE
The first operand of the accept statement is the name of the data item
where you want the collected data stored.
SOURCE FILES:
=============
Program Files
Description
========================================================
CLParms.cbl Example program that uses an accept statement and the
COMMAND-LINE function-name to collect any parameters
typed following the program name.
REQUIREMENTS:
=============
There are no special requirements necessary to support this example.
OPERATION:
==========
Animate the CLParms program. Note the output displayed in the output
window.
===========================================================
Micro Focus and Net Express are registered trademarks of:
Micro Focus International, Inc.
===========================================================
Copyright (C) 1996-2006 Micro Focus, Inc.