Proc Reference > PQN Proc Commands > IP

Comment on this topic

Documentation Comments

Use this form to comment on this topic. You can also provide any general observations about the Online Documentation, or request that additional information be added in a future release.

Reality V15.0 ()

IP command (Proc) (m618403+ip.htm)

To

Reality

Version

Topic

Submitted by

Company

Location

Email address

Comment

 

 

IP

Prompts for and accepts input from the terminal.

Syntax

IP{char{bufferRef}}

Syntax Elements

char An optional prompt character. If included, it remains in effect until reset with an IBN, IBP, IN, IP or PROMPT command.

If char is not included, it defaults to the last prompt character used or to a colon (:) if no other character has been specified.

bufferRef A direct or indirect reference to a buffer or select register where the input data is to be placed.

Operation

IP{char} places data in the active input buffer, replacing the existing parameter pointed to by the buffer pointer.

IPchar bufferRef places input in the buffer or select register specified by bufferRef. The prompt character is required in this case.

Leading and trailing blanks are removed and embedded blanks are replaced with a single attribute mark, thereby replacing the current parameter in the input buffer with multiple parameters. If the input is to a file buffer attribute (as specified by bufferRef) and contains embedded blanks, the embedded blanks are replaced with a single attribute mark as above. The attributes then replace consecutive attributes in the item. For example:

If you enter "ABC   DEF   GHI" when the command, IP?&3.2  is executed, the values "ABC", "DEF", and "GHI" would replace attributes two, three, and four, respectively, in file buffer 3.

If you want to retain blanks input at the terminal and treat the input text as a single attribute, use the IBP command.

Pressing RETURN only in response to an input prompt nulls the current parameter as pointed to by the buffer pointer.

The input buffer pointer does not change position after an IP command.

Note: The IP command does not read stacked input the way an INPUT statement in DataBasic does. All input commands in Proc ignore stacked data.

Example 1

Command Input PIB Before PIB After
IP?
3-93
UPDATE^INV
         
UPDATE^INV^3-9393
         

Example 2

Command Input PIB Before PIB After
IP:
  XXX   YY
3^234^56^78^
3^XXX^YY^56^78
  

Example 3

Command Input PIB Before PIB After
IP?
RETURN
ABC^DEF^GHI
   
ABC^^GHI
   

Example 4

Command Input File Buffer 1 Before File Buffer 1 After
IP:&1.1
JONES
000 AB-221
001 SMITH

002 2500
000 AB-221
001 JONES

002 2500

Example 5

Command Input File Buffer 4 Before File Buffer 4 After
IP?&4.1
22 RED PEN

000 2831
001 15
002 BROWN
003 PENCIL
000 2831
001 22
002 RED
003 PEN

RealityV15.0Comment on this topic