View previous topic :: View next topic
|
Author |
Message |
picus_mf Warnings : 1 New User
Joined: 09 Jun 2006 Posts: 52
|
|
|
|
Hi,
My requirement is that I have to pass some data to COBOL batch program from JCL through PARM parameter. All are existing components and I have to change them. But the program step of the JCL already contains PARM as below and there is no linkage section in the program.
Code: |
//STEP01 EXEC PGM=PGM001,
// PARM='WORKBUFF=500K VLMCONTROL=KEEP LMACCESS=RO' |
How can I pass my data (of 5 bytes) to the program?
When I tried to put my data in the existing parm with linkage in program I couldn't see the data. |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
If there isn't any LINKAGE SECTION in the program to access the current JCL-parm, then it's relatively safe to say that the parm value is not being used. However, this needs to be confirmed first.
If all of the above is true, then change the parm to pass your 5-bytes, define the parm-area in your LINKAGE SECTION, add the USING statement to the PROCEDURE DIVISION and code the program to access the JCL-parm.
There's probably existing program's in your shop that access JCL-parms, so use them as templates.
Bill |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Are you sure this is the JCL for your program?
Isn't there any documentation for the program or JCL?
What else is the program doing? Something with the Web?
Do you have the linkedit output? |
|
Back to top |
|
|
picus_mf Warnings : 1 New User
Joined: 09 Jun 2006 Posts: 52
|
|
|
|
Opps, made a mistake before, when I tried having USING statement and the data passed as below I could see the data
Code: |
//STEP01 EXEC PGM=PGM001,
// PARM='ABCDE WORKBUFF=500K VLMCONTROL=KEEP LMACCESS=RO'
|
Will the parameters after 5 bytes of data passed has the same effect after this change? How can I validate it? |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
To repeat -
Quote: |
There's probably existing program's in your shop that access JCL-parms, so use them as templates. |
Note: JCL parm's cannot be greater than 100 bytes in length.
Bill |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Since all these parms are mentioned in this Oracle Product Bulliten,
i would suggest you review the program and determine what is supposed to be processed. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
As the other Bill has already pointed out, you're going to have to verify whether the existing parameter is actually used by anything.
If you look to my 2nd, 3rd and 4th earlier questions, you'll get somewhere towards finding out.
If something is using the original parm, then putting your new parm at the front will almost certainly screw it up. Likelihood is that nothing is. "Usually" if more than one program needs a parm, the first one eats up what it wants and passes on the remainder. It might also eat up everything, requiring a program change to pass the part you need on to your program. I can't think of any reason to pass on the parm in full. So, probably you are OK, but you do have to check. |
|
Back to top |
|
|
gylbharat
Active Member
Joined: 31 Jul 2009 Posts: 565 Location: Bangalore
|
|
|
|
It seems to a predefined system program.... Not a cobol program. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Following on from dbz's good work, is your program using Documerge? Ie, is your program a "VDR"?
If so, it wasn't originally doing what is thought, as the parameter does not get passed on to DMGRFMT. Do you call this program? The third parameter is also wrong, as it should be VLMACCESS, not LMACCESS.
If nothing to do with Documerge, safely ignore existing parameter, probably just left by some slopyy JCL copying.
If you are using Documerge, you should first raise a fault for the program, as it is not taking any notice of the parameter (which is also wrong). See what anyone wants to do about it before progressing with your work. |
|
Back to top |
|
|
|