Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Not able to display data passed thru PARM from JCL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
rammraju

New User


Joined: 05 Mar 2005
Posts: 65
Location: Hyderabad

PostPosted: Thu Apr 17, 2008 12:59 am    Post subject: Not able to display data passed thru PARM from JCL
Reply with quote

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
View user's profile Send private message

CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Thu Apr 17, 2008 1:24 am    Post subject:
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Apr 17, 2008 3:22 am    Post subject:
Reply with quote

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
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Thu Apr 17, 2008 3:31 am    Post subject:
Reply with quote

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
View user's profile Send private message
rammraju

New User


Joined: 05 Mar 2005
Posts: 65
Location: Hyderabad

PostPosted: Thu Apr 17, 2008 5:39 am    Post subject: Reply to: Not able to display data passed thru PARM from JCL
Reply with quote

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

Code:
00003E00
00010100
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Apr 17, 2008 5:47 am    Post subject:
Reply with quote

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
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Thu Apr 17, 2008 5:49 am    Post subject:
Reply with quote

Try changing your program as CICS Guy suggested and retesting it. Something is not as you think it is.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Apr 17, 2008 5:55 am    Post subject:
Reply with quote

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
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Thu Apr 17, 2008 6:04 am    Post subject: Re: Reply to: Not able to display data passed thru PARM from
Reply with quote

rammraju wrote:
PARM-DATA in hex looks as, this is also same for every value I am passing thru the PARM
Code:
00003E00
00010100
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
View user's profile Send private message
rammraju

New User


Joined: 05 Mar 2005
Posts: 65
Location: Hyderabad

PostPosted: Thu Apr 17, 2008 6:25 am    Post subject: Reply to: Not able to display data passed thru PARM from JCL
Reply with quote

I deleted the program and restaged it, it went well.

Being curious I would check why it did not happen before.
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Thu Apr 17, 2008 6:43 am    Post subject: Re: Reply to: Not able to display data passed thru PARM from
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Apr 17, 2008 7:06 am    Post subject: Reply to: Not able to display data passed thru PARM from JCL
Reply with quote

Quote:
I deleted the program and restaged it, it went well.
Good to hear that it is now working icon_smile.gif

Unfortunate that we didn't get to learn why. . . icon_neutral.gif

d
Back to top
View user's profile Send private message
rammraju

New User


Joined: 05 Mar 2005
Posts: 65
Location: Hyderabad

PostPosted: Thu Apr 17, 2008 7:15 am    Post subject: Reply to: Not able to display data passed thru PARM from JCL
Reply with quote

I totally agree CICS GUY, its the way to learn things...

Going back, before deleting the component I have tried putting a unique display
Code:
DISPLAY '1'
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
View user's profile Send private message
rammraju

New User


Joined: 05 Mar 2005
Posts: 65
Location: Hyderabad

PostPosted: Thu Apr 24, 2008 4:56 am    Post subject: Reply to: Not able to display data passed thru PARM from JCL
Reply with quote

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
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Thu Apr 24, 2008 5:51 am    Post subject: Re: Reply to: Not able to display data passed thru PARM from
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Apr 24, 2008 6:12 am    Post subject:
Reply with quote

Hello Ram,

Thank you for the followup icon_smile.gif

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
View user's profile Send private message
rammraju

New User


Joined: 05 Mar 2005
Posts: 65
Location: Hyderabad

PostPosted: Thu Apr 24, 2008 6:13 am    Post subject: Reply to: Not able to display data passed thru PARM from JCL
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts ODPP(Optim Data privacy Provider) Iss... Rama kishore IBM Tools 1 Mon Nov 07, 2016 5:46 pm
No new posts Can sending 5 MB data between cobol p... Kevin Vaz CICS 12 Tue Oct 18, 2016 4:50 pm
No new posts output data in CSV Format janmejay COBOL Programming 8 Sat Oct 15, 2016 2:20 pm
This topic is locked: you cannot edit posts or make replies. output data in CSV Format janmejay DFSORT/ICETOOL 3 Sat Oct 15, 2016 2:16 pm
No new posts FTP Server and FTP.DATA vasanthz All Other Mainframe Topics 2 Wed Oct 12, 2016 11:49 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us