basic.procread Statement/BASIC Program

basic.procread

Command basic.procread Statement/BASIC Program
Applicable release versions: AP, R83
Category BASIC Program (486)
Description reads the calling PROCs primary input buffer and assigns its contents to a specified variable.

When successful, the variable is treated as a string of characters delimited by spaces. The "field" function may be used to parse the variable. The "dcount" function may be used to determine the number of entries (number of spaces + 1) in the buffer variable.

The "else" condition is taken when the program has not been executed from a PROC.
Syntax procread variable [then | else statement.block]
Options
Example
pq
ri
s1
oenter beginning date +
ip
s2
oenter ending date +
ip
hrun bp this.program
p

This is a sample PROC which prompts the operator for two dates. This 
information can now be passed to the Pick/BASIC program 
"this.program".

this.program
001 procread buffer else
002   print 'this.program must be run from a PROC'
003   stop
004 end
005 start.date = field(buffer,' ',1)
006 end.date   = field(buffer,' ',2)
Purpose
Related basic.then/else.construct
statement.block
basic.statements
basic.count
basic.tclread
basic.procwrite
basic.error()
basic.field