using INPUT in a batch mode

Hi,

I want to read some data from a jcl using Input command.
The line looks like: abc11111111111111111,123,20120724,user,vse

As the program start I perform Input command : input #a #b #c #d #e. (size for each value #a=a29,#b=a8,#c=a6,#d=a4,#e=a8)
But I get only the 2 paramaters.

Hezi

What is your input delimiter (ID) ?
If it is anything other than “,” getting only two parms makes absolute sense :wink:
Finn

According to the documentation for INPUT:

I have never used delimited mode. What I would do is this:

define data local
1 #input (a78)
1 #a (a29) 
...
end-define
input #input
separate #input into #a #b #c #d #e with delimiter ',' ignore
...

When I define all fields (#a to #e) as a29 it works no matter how I change the parameters (IM, ID, DC, …)

I changed the input to

separate #input into #a #b #c #d #e ignore with delimiter ','  number #num

and #num is 5 in all cases.

However, when I change the definitions to match what you said

#a=a29,#b=a8,#c=a6,#d=a4,#e=a8

I get a NAT1314 (target field too small) which is to be expected as the 3rd part of your input is 7 digits
but you separate it into an a6.

Same result on the mainframe and Windows, so your example can hardly match your actual code.

Hi,

You are all probaly right.
I get that jcl from an open system, and there was no IM= defition.

Hezi