Can't submit job to internal reader
-
- Posts: 40
- Joined: Wed Nov 01, 2017 8:59 pm
- Skillset: XL/C, ISPF, USS
- Referer: My colleagues
Re: Can't submit job to internal reader
Thank you, Enrico. Then I'll go on to check what exactly my programme writes to the internal reader.
-
- Global moderator
- Posts: 3006
- Joined: Fri Apr 18, 2008 11:25 pm
- Skillset: tso,rexx,assembler,pl/i,storage,mvs,os/390,z/os,
- Referer: www.ibmmainframes.com
Re: Can't submit job to internal reader
there is a logic flaw in Your testing procedure ...
before letting the system deal with the output of Your program
the first thing to do is to LOOK at that output ...
check that it is right, submit it by hand and
only after having checked that the result of the submitted jcl is right
automate the whole shebang
before letting the system deal with the output of Your program
the first thing to do is to LOOK at that output ...
check that it is right, submit it by hand and
only after having checked that the result of the submitted jcl is right
automate the whole shebang
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
-
- Global moderator
- Posts: 2105
- Joined: Thu Jun 03, 2010 6:21 pm
- Skillset: Assembler, JCL, utilities
- Referer: zos.efglobe.com
Re: Can't submit job to internal reader
Two things.
First, what are you "protecting" with the ENQ? For all intents and purposes, the internal reader allocation itself protects the submission. You don't really need anything else! We have a tendency to think there is one internal reader, but there are really, in most shops, several internal readers in addition to the dedicated internal readers used for the START command and TSO LOGONs. You don't have to worry about someone else messing up your submission.
Second. The ACB/RPL you use to write to the internal reader should be the same as used to write a VSAM ESDS. Write to an ESDS that as a proof of concept. Well, back in the 1980s (or was in the 1970s?) I didn't bother, though by then I was already much more experienced than you.
First, what are you "protecting" with the ENQ? For all intents and purposes, the internal reader allocation itself protects the submission. You don't really need anything else! We have a tendency to think there is one internal reader, but there are really, in most shops, several internal readers in addition to the dedicated internal readers used for the START command and TSO LOGONs. You don't have to worry about someone else messing up your submission.
Second. The ACB/RPL you use to write to the internal reader should be the same as used to write a VSAM ESDS. Write to an ESDS that as a proof of concept. Well, back in the 1980s (or was in the 1970s?) I didn't bother, though by then I was already much more experienced than you.
-
- Posts: 40
- Joined: Wed Nov 01, 2017 8:59 pm
- Skillset: XL/C, ISPF, USS
- Referer: My colleagues
Re: Can't submit job to internal reader
To Steve and Enrico,
Thank you for following up and your suggestion. I'm definitely not experienced. I had been a *NIX programmer before got hired by that Mainframe software company 1+ years ago.
I really can't find anything wrong in my test programme.
I don't know how to write ESDS so I modified the OPEN/PUT statements as well as the DCB block and the DD statement so that the test programme writes to a simple PS dataset. Then I opened the PS dataset (looked fine) and 'sub'-ed it. The job worked find!
I even used IEBGENER to directly 'copy' the PS dataset mentioned above to 'SYSOUT=(A,INTRDR)', and the job in the PS was submitted too!
I only failed to submit the job from my stupid test programme! Really frustrating.
THANK YOU GUYS AGAIN for your time and help. I have to wait for my senior colleagues to be back after the Christmas week and see if they could find anything.
Thank you and wish you a merry Christmas!
Thank you for following up and your suggestion. I'm definitely not experienced. I had been a *NIX programmer before got hired by that Mainframe software company 1+ years ago.
I really can't find anything wrong in my test programme.
I don't know how to write ESDS so I modified the OPEN/PUT statements as well as the DCB block and the DD statement so that the test programme writes to a simple PS dataset. Then I opened the PS dataset (looked fine) and 'sub'-ed it. The job worked find!
I even used IEBGENER to directly 'copy' the PS dataset mentioned above to 'SYSOUT=(A,INTRDR)', and the job in the PS was submitted too!
I only failed to submit the job from my stupid test programme! Really frustrating.
THANK YOU GUYS AGAIN for your time and help. I have to wait for my senior colleagues to be back after the Christmas week and see if they could find anything.
Thank you and wish you a merry Christmas!
-
- Global moderator
- Posts: 2105
- Joined: Thu Jun 03, 2010 6:21 pm
- Skillset: Assembler, JCL, utilities
- Referer: zos.efglobe.com
Re: Can't submit job to internal reader
This is about as simple and bare bones as you can get. Yes, it did work in very limited testing.
Code: Select all
INTRDR CSECT
USING *,12
SAVE (14,12),,INTRDR
LR 12,15
LA 15,SAVEAREA
ST 13,4(,15)
ST 15,8(,13)
LR 13,15
OPEN (JCL,INPUT)
OPEN (INTRDRR,OUTPUT)
LOOP GET JCL
ST 1,(RPLAREA-IFGRPL)+INTRPL
PUT RPL=INTRPL
LTR 15,15
BZ LOOP
DC H'0'
EOF NOPR 0
CLOSE INTRDRR
CLOSE JCL
L 13,4(,13)
RETURN (14,12),RC=0
SAVEAREA DC 9D'0'
JCL DCB DSORG=PS,MACRF=GL,DDNAME=JCL,EODAD=EOF
INTRDRR ACB DDNAME=INTRDR,MACRF=(ADR,SEQ,OUT)
INTRPL RPL AREALEN=80,RECLEN=80,AREA=*-*,OPTCD=(ADR,SYN,SEQ,NUP), ->
ACB=INTRDRR
DC 0D'0'
IFGRPL ,
END INTRDR
-
- Posts: 40
- Joined: Wed Nov 01, 2017 8:59 pm
- Skillset: XL/C, ISPF, USS
- Referer: My colleagues
Re: Can't submit job to internal reader
To Steve:
Really ?? Cool !!
I must try it after dinner, and will let you know the result. A BIG THANK you in advance!



I must try it after dinner, and will let you know the result. A BIG THANK you in advance!
-
- Posts: 40
- Joined: Wed Nov 01, 2017 8:59 pm
- Skillset: XL/C, ISPF, USS
- Referer: My colleagues
Re: Can't submit job to internal reader
To Steve:
Thank you very much for your sample programme. It really worked in my environment and it showed me a simple but clear skeleton code for using the internal reader. After I got a better understanding to all these stuff, I reviewed my code and finally managed to sort out the mistake. Now my programme can also submit jobs through internal reader. Very happy.
Thank you again!
Thank you very much for your sample programme. It really worked in my environment and it showed me a simple but clear skeleton code for using the internal reader. After I got a better understanding to all these stuff, I reviewed my code and finally managed to sort out the mistake. Now my programme can also submit jobs through internal reader. Very happy.
Thank you again!
-
- Global moderator
- Posts: 2105
- Joined: Thu Jun 03, 2010 6:21 pm
- Skillset: Assembler, JCL, utilities
- Referer: zos.efglobe.com
Re: Can't submit job to internal reader
In my very first post, I pointed out two rather obvious mistakes:
- Your RPL did not point to its corresponding ACB.
- The RPL did not specify an area address.
-
- Posts: 2
- Joined: Wed Jun 01, 2016 6:33 pm
- Skillset: assembler, cics, vtam recc
- Referer: google
Re: Can't submit job to internal reader
No pun intended, but....
You are scratching your ear with your foot.
I do not see any reason to use ACB/RPL for something so simple, unless You want just to "practice" your HLASM skills, it can be done but not as quickly as You may want to.
If You, on the other hand, want this to work fast, a very quick way to do it, is getting rid of the ACB/RPL, and as Enrico has already pointed out, treat your "internal reader" dataset as a PS file, use an DCB instead, which points to... again.. to your a sequential "internal reader" dataset, just open it up, write n it, and close it. You will have nothing to do with your JCL, it is OK as it is.
The "internal reader" quotes are just to tease a little bit, since you can indeed, write to any other PS dataset with it, just by changing your JCL DDNAME statement accordingly.
You are scratching your ear with your foot.
I do not see any reason to use ACB/RPL for something so simple, unless You want just to "practice" your HLASM skills, it can be done but not as quickly as You may want to.
If You, on the other hand, want this to work fast, a very quick way to do it, is getting rid of the ACB/RPL, and as Enrico has already pointed out, treat your "internal reader" dataset as a PS file, use an DCB instead, which points to... again.. to your a sequential "internal reader" dataset, just open it up, write n it, and close it. You will have nothing to do with your JCL, it is OK as it is.
The "internal reader" quotes are just to tease a little bit, since you can indeed, write to any other PS dataset with it, just by changing your JCL DDNAME statement accordingly.
-
- Global moderator
- Posts: 2105
- Joined: Thu Jun 03, 2010 6:21 pm
- Skillset: Assembler, JCL, utilities
- Referer: zos.efglobe.com
Re: Can't submit job to internal reader
I said this in my very first post in this thread. I wonder if gcastillo read it.
The topic starter did not pick up on this, but the ACB/RPL code we have been discussing in this thread can be used to create VSAM entry sequenced data sets.
steve-myers wrote:... Why are you using this interface? What do you hope to gain? The only potential advantage I know of other than a tiny advantage of using less CPU time is to obtain the job id of the submitted job, which you are not doing.
The topic starter did not pick up on this, but the ACB/RPL code we have been discussing in this thread can be used to create VSAM entry sequenced data sets.
-
- Similar Topics
- Replies
- Views
- Last post
-
- 7
- 3872
-
by jcdm
View the latest post
Tue Jul 25, 2023 11:57 am