View previous topic :: View next topic
|
Author |
Message |
pahi Currently Banned New User
Joined: 04 Dec 2008 Posts: 7 Location: bangalore
|
|
|
|
Hi,
Even after compiling and run without errors,my output is not displaying why?
Regards,
Pahi |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
pahi,
Welcome to the forums.
Your statements gives no clue about your problem. If it's nowhere related to this topic, you can start a new topic in the appropriate forum with all the relevant info regarding your current problem.
While posting parts of your code or error messages, use the 'Code' tags here to preserve the alignment. After typing your message, you can 'Preview' to make sure your message looks as you intended and then click 'Submit'.
The better you explain your problem, the sooner you get help from here. Goodluck. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello and welcome to the forum,
Your topic has been split from the one replied to and made a new topic for your question. With the little that is known about the problem, i've placed this in the part of the forum for Abends and Debugging. It can be moved later if necessary.
More information is needed for us to be able to help you.
Please post your jcl and the informational messages from the execution. When posting jcl, code, or data, please use copy/paste and the "Code" tag. Then use Preview to see how your post will appear to the forum. When you are satisfied with how your post appears, Submit. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
pahi wrote: |
Hi,
Even after compiling and run without errors,my output is not displaying why?
Regards,
Pahi |
Perhaps the MSGCLASS is one that
a) Gets routed elsewher
b) Gets immediately deleted
Ask your peers as this may be site specific. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
Hi,
Quote: |
my output is not displaying why |
Where do you look for the output and where does JCL route it ? |
|
Back to top |
|
|
pahi Currently Banned New User
Joined: 04 Dec 2008 Posts: 7 Location: bangalore
|
|
|
|
Code: |
IDENTIFICATION DIVISION.
PROGRAM-ID. TEST1.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 NUM1 PIC 9(5) VALUE 4.
01 NUM2 PIC 9(5) VALUE 10.
01 RES PIC 9(6) VALUE 0.
PROCEDURE DIVISION.
ADD NUM1 TO NUM2 GIVING RES.
DISPLAY "RES" RES.
STOP RUN. |
Code: |
//RUN EXEC PGM=TEST1
//STEPLIB DD DSN=sun004.XN.LOAD,DISP=SHR
//SYSIN DD *
XYZ
/*
//SYSOUT DD SYSOUT=* |
Edited: Please use BBcode when You post some code, that's rather readable, Thanks...Anuj |
|
Back to top |
|
|
dharmendra_kp
New User
Joined: 10 Mar 2005 Posts: 33 Location: Lewiston
|
|
|
|
pass some numeric value for NUM1 & NUM2 instead of XYZ. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
What does your JCL to run this program look like? |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
Quote: |
pass some numeric value for NUM1 & NUM2 instead of XYZ.
|
Please note there are no ACCEPT statements or READ statements in the COBOL code. The XYZ is not being passed to the program. NUM1 and NUM2 have VALUE clauses. |
|
Back to top |
|
|
PeD
Active User
Joined: 26 Nov 2005 Posts: 459 Location: Belgium
|
|
|
|
Quote: |
pass some numeric value for NUM1 & NUM2 instead of XYZ.
|
SYSIN has nothing to do here. |
|
Back to top |
|
|
PeD
Active User
Joined: 26 Nov 2005 Posts: 459 Location: Belgium
|
|
|
|
Just too late, you are first,Robert
Also, DISPLAY UPON xxxx Which is your system's output display? |
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1248 Location: Richfield, MN, USA
|
|
|
|
As expat 1st pointed out, MSGCLASS is probably the key to where your DISPLAY went. |
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1248 Location: Richfield, MN, USA
|
|
|
|
Also, to verify you are executing the program you think you are executing, it would help to add the DATE-COMPILED clause to your source and to display the WHEN-COMPILED register at execute time. |
|
Back to top |
|
|
vasanthkumarhb
Active User
Joined: 06 Sep 2007 Posts: 275 Location: Bang,iflex
|
|
|
|
Hi,
The main problem with this code is missing ACCEPT statement. Coding is completely wrong. The data being sent should be numeric rather Alphanumeric.
[/list][/code][/quote] |
|
Back to top |
|
|
PeD
Active User
Joined: 26 Nov 2005 Posts: 459 Location: Belgium
|
|
|
|
vasanthkumarhb
Please re-read the code : XYZ is not used here.
Code is not completely wrong for a first exercise. It is just unnecessary extra code. |
|
Back to top |
|
|
vasanthkumarhb
Active User
Joined: 06 Sep 2007 Posts: 275 Location: Bang,iflex
|
|
|
|
PeD,
Thanks for the correction, I was noticing with out ACCEPT statement JCL code will not move that value to the respective variable. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
Vasanth: it is not wrong to have extraneous DD statements in a COBOL run job. The data won't be usable or referenced, but you can put almost as many extra DD statements as desired in the job (up to the operating system limit). The run job having //SYSIN DD * is not going to have anything happen with the data. The program does nothing with SYSIN so nothing will happen with any data after the SYSIN. Since the program didn't have any ACCEPT statement to start with, it probably wasn't supposed to have one.
Pahi: I have verified by compiling and running your code that you should get a line of output in the SYSOUT DD statement. If it is not showing up there, you need to discuss with your peers or system support staff what SYSOUT class to use for output you wish to display. Depending on how your system is set up, and the JOB statement options, your option could be automatically routed to a spool manager instead of allowing you to see it via SDSF, (E)JES, or the like. SYSOUT classes are extremely site dependent and we cannot tell you which class will work for you -- only someone at your site has that information. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
Hi pahi,
Do a favor to us - post the SYSOUT of the JOB you execute. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hi Anuj,
Quote: |
post the SYSOUT of the JOB you execute |
Ah, well, that would be the problem - the output (includng SYSOUT) has disappeared. . .
d |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
I give up.. |
|
Back to top |
|
|
|