Table of Contents

About

The accept command reads a line of input and stores it in a given substitution variable.

Syntax

ACC[EPT] 
   variable [NUM[BER] | CHAR | DATE | BINARY_FLOAT | BINARY_DOUBLE] 
   [FOR[MAT] format] 
   [DEF[AULT] default] 
   [PROMPT text | NOPR[OMPT]] 
   [HIDE]

where:

  • variable is the variable command
  • prompt is the prompt command
  • HIDE will hide the input

Example

  • For a password
ACCEPT pwd CHAR PROMPT 'Type your Password:  ' HIDE
  • For a number
ACCEPT salary NUMBER FORMAT '999.99' DEFAULT '000.0' PROMPT 'Enter weekly salary:  '
PROMPT You have enter: &salary