Link to home
Start Free TrialLog in
Avatar of AFreeman123
AFreeman123

asked on

"JCL STATEMENT MAXIMUM LENGTH EXCEEDED" error in a JCL program.

I get a "JCL STATEMENT MAXIMUM LENGTH EXCEEDED" error on an IF statement in a JCL program.  The length of the statement is 632 words or 126 lines.  Does anyone know what the limit is?
ASKER CERTIFIED SOLUTION
Avatar of giltjr
giltjr
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Opps, just saw it was an IF.  How many nested layers and how many characters?
So far the only thing I can find is that an IF construct can have no more that 15 levels.
Avatar of AFreeman123
AFreeman123

ASKER

It is a one level if statement created by an automating validation step checker.  Copying this line into word I get 7171 char.    Exact error line is IEFC012I JCL STATEMENT MAXIMUM LENGTH EXCEEDED.
I looked up the message and IBM says to check to make sure there are no missing continuation marks or close parenthesis.


That is a LONG If statement.  I would double check what the tool is attempting to do.  It seems that 7,000 bytes of "If" would be a bit too much.  I could not image the number of steps that you would need to be executed or the number of different condition codes combinations that you would need in order to get an If construct that big.
Syntax is good.  I did find that an IF statement run before an EXEC step is limited to 254 steps for the job.  This job has 252 steps.
Unless something has changed all jobs are limited to 254 steps, with our without If statements.  Has been that way for as long as I can remember.

Umm, how do you know the syntax is good if MVS/JES will not process it?  Until MVS/JES can process it, you can only assume that it is good.

I does not seem that IBM documents the maximum length for JCL statements.  The only length restrictions I can find (or that I ever knew about) were with individual parameters.

My suggestion would be to open a ticket with IBM and ask.
And the answer is statements are contained in an 8192 byte buffer.  The step in question  of 7171 char + spaces = 8932 bytes.