View previous topic :: View next topic
|
Author |
Message |
rammraju
New User
Joined: 05 Mar 2005 Posts: 65 Location: Hyderabad
|
|
|
|
Hi,
I have to use a value in the cobol program which is sent thru JCL, I am using PARM for this purpose.
My cobol linkage looks as
Code: |
LINKAGE SECTION.
01 PROGRAM-LINKAGE.
05 PARM-LEN PIC S9(04) COMP.
05 PARM-DATA PIC X(08).
PROCEDURE DIVISION USING PROGRAM-LINKAGE.
0000-MAIN-PARA.
DISPLAY 'PARM-DATA: ' PARM-DATA
DISPLAY 'PARM-LEN: ' PARM-LEN |
My JCL step looks as
Code: |
//STPE0010 EXEC PGM=ABCDEF,PARM='00000002'
// |
when i run this JCL i am seeing spaces in the spool, below is how my spool looks
Code: |
********************************* TOP OF DATA ****************
PARM-DATA:
PARM-LEN: 00010
******************************** BOTTOM OF DATA *************
|
can someone let me know why I am not able to see the data which I am passing from my JCL
Thanks in advance |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
Well, IIRC, the length is correct....
I would try next DISPLAY 'PARM-DATA:*' PARM-DATA '*' and hex display the line between the two askericks.... |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
This code:
Code: |
*
LINKAGE SECTION.
01 PROGRAM-LINKAGE.
05 PARM-LEN PIC 9(4) COMP.
05 PARM-DATA PIC X(8).
*
PROCEDURE DIVISION USING PROGRAM-LINKAGE.
DISPLAY 'PARM-LEN ' PARM-LEN.
DISPLAY 'PARM-DATA ' PARM-DATA.
GOBACK. |
executed with this jcl:
Code: |
//X EXEC PGM=DSCHCOBX,PARM='1234567' |
gives:
Code: |
PARM-LEN 0007
PARM-DATA 1234567 |
Quote: |
Well, IIRC, the length is correct.... |
I believe the length will be the number ov characters between the quotes.
The length of 10 leads me to believe the wrong version of the program (or the wrong program) may be executed. |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
dick scherrer wrote: |
CICS Guy wrote: |
Well, IIRC, the length is correct.... |
I believe the length will be the number ov characters between the quotes. |
I did preface it withan IIRC....grin.... |
|
Back to top |
|
|
rammraju
New User
Joined: 05 Mar 2005 Posts: 65 Location: Hyderabad
|
|
|
|
This is a new program I am writing, so there is no chance of another version being excuted.
What I observed from the outputs is the output data is never changing, its showing the same for any value I am sending thru PARM
Code: |
********************************* TOP OF DATA ****************
PARM-DATA:
PARM-LEN: 00010
******************************** BOTTOM OF DATA ************* |
PARM-DATA in hex looks as, this is also same for every value I am passing thru the PARM
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Please post the jcl you are using for this job.
It may help if you post more of the code as well (not the entire program). |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
Try changing your program as CICS Guy suggested and retesting it. Something is not as you think it is. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
This is a new program I am writing, so there is no chance of another version being excuted. |
What if some other module of that name already existed in the joblib/steplib concatenation.
It might be interesting to to add some more literal displays that do not refer to the linkage section.
Also, a question. Are the displays you posted the first instructions executed in the program? I am wondering if somehow storage got "walked on". |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
rammraju wrote: |
PARM-DATA in hex looks as, this is also same for every value I am passing thru the PARM
|
My skepticalism would be yelling at me at this point.
My solution would to put a unique display (compile date?...'hello, this is test 1A', anything...) into the display to insure I was seeing the execution of the program I thought I was executing.... |
|
Back to top |
|
|
rammraju
New User
Joined: 05 Mar 2005 Posts: 65 Location: Hyderabad
|
|
|
|
I deleted the program and restaged it, it went well.
Being curious I would check why it did not happen before. |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
rammraju wrote: |
IBeing curious I would check why it did not happen before. |
I really can't help you there, but, as I've learned, when the impossible is happening, you have (obviously) missed something...
Sometimes plugging a unique phrase or date/time into a display will prove or disprove that you are actually executing the program you think (are sure) you are actually executing....
Been there, done that, 'got the T-Shirt'....sometimes the simplest errors can 'cloud' the thinking.... |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Quote: |
I deleted the program and restaged it, it went well. |
Good to hear that it is now working
Unfortunate that we didn't get to learn why. . .
d |
|
Back to top |
|
|
rammraju
New User
Joined: 05 Mar 2005 Posts: 65 Location: Hyderabad
|
|
|
|
I totally agree CICS GUY, its the way to learn things...
Going back, before deleting the component I have tried putting a unique display
and incremented it whenver I was compiling it again (as suggested by you). The new display code was being displayed but PARM data never came up.
This made me think on the storage part, hence I deleted and restaged; and it worked. |
|
Back to top |
|
|
rammraju
New User
Joined: 05 Mar 2005 Posts: 65 Location: Hyderabad
|
|
|
|
I was able to recreate the problem and this time I found the culprit.
It is the compiler option
Code: |
CICS(''NOCBLCARD,SP'') |
which is causing the problem.
When I try to remove this and compile/run the program, it is taking the PARM data supplied from the JCL.
Now the thing I have to find out is what is this compiler option doing
Thanks |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
rammraju wrote: |
It is the compiler option
Code: |
CICS(''NOCBLCARD,SP'') |
which is causing the problem. |
Why do you have a CICS translator option in (what looks like) a batch compile? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello Ram,
Thank you for the followup
Hopefully, your system has standard compile jcl procs. Some for CICS, some for batch, some for database, etc and combinations. It is a very dangerous practice for each developer to have their own and not use common procs. . .
Might it be that the batch job was simply compiled with other than the standard batch compile jcl? |
|
Back to top |
|
|
rammraju
New User
Joined: 05 Mar 2005 Posts: 65 Location: Hyderabad
|
|
|
|
Its an option we have to uncheck while compiling batch programs from our version control tool (changeman). Apparently it was overlooked and had this issue come on.
Thanks |
|
Back to top |
|
|
|