JCL IP

Man Page Index


Prompts for input and places it into the active input buffer or a nominated buffer.

 

SYNTAX

IP{c{r}}

 

SYNTAX ELEMENTS

c is an optional prompt character which, once used, remains in effect until a new IBN, IBP, IN or IP command is issued. If c is not specified, the prompt character will default to the last prompt character used, or to a colon (:).

r is a direct or indirect reference to a buffer or select register which is to receive the data. If you use a reference, the prompt character c must be specified.

 

NOTES

If you do not specify a buffer reference, the active input buffer will be used.

The new data will replace the parameter at the current buffer pointer position but the pointer will not be moved.

Leading and trailing spaces will be removed and groups of one or more embedded spaces will be replaced by a single field mark. By replacing a parameter with data that contains spaces, you can insert several new parameters.

When you place data containing embedded spaces into a file buffer, the new parameters will replace successive fields in the buffer. For example, if the response to an IP?&2.1 command is:

<SPACE>AA<SPACE><SPACE>BB<SPACE>CC"

fields one, two, and three, of file buffer 2 will be replaced with "AA", "BB", and "CC".

If the user responds with RETURN only, a null parameter will be created.

If you want to keep the input data exactly as entered, use the IBP command.

 

EXAMPLE 1

Command PIB Before Input PIB After
IP? AAA^BBB CCC AAA^BBB^CCC
       ^       ^

 

EXAMPLE 2

Command PIB Before Input PIB After
IP? AA^BB^CC XX X AA^XX^X^CC
   ^    ^

 

EXAMPLE 3

Command PIB Before Input PIB After
IP? ABC^DEF^GHI <ENTER> ABC^^GHI
   ^    ^

 

EXAMPLE 4

Command File Buffer 2 Before Input File Buffer 2 After
IP:&2.2 000 Key BBB 000 Key
001 AAA 001 AAA
002 XXX 002 BBB
003 CCC 003 CCC

 

EXAMPLE 5

Command File Buffer 2 Before Input File Buffer 2 After
IP:&2.2 000 Key BB CC DD 000 Key
001 AAA 001 AAA
002 XXX 002 BB
003 DDD 003 CC
004 DD

JCL