I have a batch module which has an INPUT statement like this:
1380 INPUT #PARM-AGENCY-START /* 3 bytes A
1390 #PARM-YEAR-START /* 4 bytes A
1400 #PARM-YEAR-END /* 4 bytes A
1410 #PARM-ANALYST-CODE /* 2 bytes A
The job runs fine with this cards:
001100 //NATEXEC.SYSIN DD *
But when invoked on line thru NATRJE, it is giving me an error 1124
on the INPUT statement above.
If I change the names of the parms to #P1, #P2, #P3 and #P4 it works online, but I would prefer to keep the long names because they are more explanatory, specially if I use SET CONTROL ‘D’.
Change the INPUT statement:
INPUT (LS=120) #PARM-AGENCY-START
The error 1124 is because there is no value for #parm-analyst-code.
That said, what else was different when you changed to #p1 #p2 #p3 #p4 in the INPUT statement? were the formats the same as shown above (A3 A4 A4 A2 ??).
As always, thanks to Ralph and Steve.
I have not maintained batch code for a while and this brings me memories of old NAT 1.8 when trying to have a string bigger than you could type on a single line.
This site has old code (1987) trying to run under Nat 4.1.4. :roll:
Parm #parm-analyst-code is optional and is the last one on the parm card.
This was working fine with/without the last parm (#parm-analyst-code now, before it was a shorter name) until I created a more meaninful field names.
I think the new longer names caused the problem and Ralph’s solutions worked like a charm.
Thanks again to both of you.
Reading “between the lines,” Carlos compiled his program with the default LS=79 and executed with IM=F.
The four field names, used as captions, cannot fit onto a single line, so Natural builds a 2-line map. The fourth parameter value (a null value) was provided on the first input line, and Natural responded with the 1124, expecting a second input line.
There are several solutions:
. Reduce the number of characters on the line: shorter field names (already rejected)
. Reduce the number of characters on the line: INPUT (IP=F)
. Increase the line size: INPUT (LS=120)
. Explicit multiple lines in the map: IM=D (to maintain the single line of input data) and 1 field per line:
Thanks for the follow up Ralph.
The code has worked for “centuries” with short parm names.
Since the enduser is allowed to run their jobs (!!!) against Production either on line (thru NATRJE like inhouse module) or batch using TSO, I decided to create more meaninful parms, this way when they run it, I can coded like this:
//NATEXEC.SYSIN DD *
Note that the last parm #PARM-ANALYST-CODE is not entered and it works fine, but if I try to put all 4 parms like above, it will not fit on the same line.
Your suggestion of (LS=120) worked for both submissions, but I am not understanding your suggestions #2 and #4, can you elaborate a bit more?
If a use IM=D and code like:
How should my JCL look like? Like this?
With or without commas after each parm?
#2 IP=F means that no field captions (input prompts) will be generated, so the map lines will be much shorter.
With IP=T (the default), you get
#PARM-AGENCY-START ___ #PARM-YEAR-START ____ #PARM-YEAR-END ____ #PARM-ANALYST-CODE __
With IP=F you get
___ ____ ____ __
#4 By placing each field on a separate line, there is plenty of room on the map for a 32-character caption (field name) and a 4-character value. The map would look like this:
With IM=F (forms mode input), the input data must match the form, line by line, and would look like this:
With IM=D (delimiter mode input), the input fileds are taken from the map from left to right, and from top to bottom, and strung across the data line.
A data line can be continued if necessary. In keyword mode, for example
Put it on my tab Ralph.
This is not an on line module as you suggested, but a batch report.
However, the user can sub it on line from a map where each parm exist as a field on a map (which works fine on line) and then each parm is passed to TSO like this:
CALL 'RJE' #RETURN-CODE #AREA-A #LENGTH
0370 1 #RETURN-CODE (B04)
0380 1 #LENGTH (B02) INIT<640>
0550 02 #AREA-A (A240)
#AREA-A is a redefinition of
0400 01 #PARM-AREA1
0410 02 #AREA1
0420 03 #FILL1A (A02) INIT<'//'>
0430 03 #JOB-NAME (A08) INIT<'AAP350JR'>
0440 03 #FILL1B (A25) INIT<' JOB (P103236C,BUD0000),"'
0450 03 #JOB-USER (A08)
0460 03 #FILL1C (A37) INIT<'",CLASS=J,MSGCLASS=X '>
0470 02 #AREA2
0480 03 #FILL2A (A16) INIT<'//STEP1 EXEC '>
0490 03 #PROC-NAME (A08) INIT<'ABD000PR'>
0500 03 #FILL2B (A56)
0510 02 #AREA3
0520 03 #TEST-PROC (A18)
0530 03 #FILL3 (A62)
I did not try your other suggestions, only this one:
Which worked fine. Once I try the others, I let you know.