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
 

 

Any Way by which Display can be suppressed
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
saurabh39
Warnings : 1

Active User


Joined: 11 Apr 2008
Posts: 144
Location: Jamshedpur

PostPosted: Wed Aug 17, 2011 7:16 pm    Post subject: Any Way by which Display can be suppressed
Reply with quote

Hi All,

In my program, the control is going to one part of logic, where display statements are there, but due to some reason the displays are not coming in spool, which means -
1. Either my analysis is wrong
2. Or there are some method to suppress the displays which I am not aware of.

So, i wanted to know, whether there are any method in cobol by which displays can be suppressed. I know one method by using debugging option. Apart from this are there any?
Back to top
View user's profile Send private message

Craq Giegerich

Senior Member


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

PostPosted: Wed Aug 17, 2011 7:52 pm    Post subject:
Reply with quote

How is SYSOUT defined in your JCL?
Back to top
View user's profile Send private message
saurabh39
Warnings : 1

Active User


Joined: 11 Apr 2008
Posts: 144
Location: Jamshedpur

PostPosted: Wed Aug 17, 2011 8:30 pm    Post subject: Reply to: Any Way by which Display can be suppressed -
Reply with quote

Hi Craq,

The sysout is -

//SYSOUT DD SYSOUT=($,,STAN)
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Wed Aug 17, 2011 8:33 pm    Post subject:
Reply with quote

There is a link to manuals at the top of this page. Click on it, find the COBOL Language Reference manual, and read chapter 4.1.1 on the SOURCE-COMPUTER paragraph of the ENVIRONMENT DIVISION. Pay special attention to the WITH DEBUGGING MODE comments and how placing a D in column 7 will cause the line to be compiled as a comment if there is no WITH DEBUGGING MODE, or compiled as a COBOL source statement if WITH DEBUGGING MODE is specified.
Back to top
View user's profile Send private message
saurabh39
Warnings : 1

Active User


Joined: 11 Apr 2008
Posts: 144
Location: Jamshedpur

PostPosted: Wed Aug 17, 2011 9:04 pm    Post subject: Reply to: Any Way by which Display can be suppressed -
Reply with quote

Hi Robert,

The program isn't using any debugging mode.

Apart from the problem stated, I am facing another issues - like
1. Program is using verbs like Transform and Exhibit Named.
2. Syntax for copybook is 01 STATE-END-NARR COPY WCSJ9000.

Which my compiler COBOL VS 2 is not accepting as valid verb.

I searched the manuals, but i am getting these as reserved keyword and not able to identify the version which introduced it.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Wed Aug 17, 2011 9:33 pm    Post subject:
Reply with quote

TRANSFORM and EXHIBIT were part of the old OS/VS COBOL which has been out of support since 1994 -- which means the compiler has not been available from IBM since 1992. This code will likely require a number of changes to get it to compile with the Enterprise COBOL compiler.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Aug 17, 2011 9:36 pm    Post subject:
Reply with quote

Quote:
This code will likely require a number of changes to get it to compile with the Enterprise COBOL compiler.


or even COBOL 2, which is also obsolete.
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: Wed Aug 17, 2011 9:42 pm    Post subject:
Reply with quote

Hello,

Where did you get code that does not compile with your compiler?

Is it possible that the wrong compiler is being used?

When was this program last compiled?

What error is shown for the COPY?
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Wed Aug 17, 2011 10:08 pm    Post subject: Re: Reply to: Any Way by which Display can be suppressed -
Reply with quote

saurabh39 wrote:
[...]Apart from the problem stated, I am facing another issues - like
1. Program is using verbs like Transform and Exhibit Named.
2. Syntax for copybook is 01 STATE-END-NARR COPY WCSJ9000.

[...]


If you still have these problems, how are you getting a version to run which doesn't give you the displays you want?

Replace the TRANSFORM with INSPECT REPLACING. EXHIBIT NAMED will have to become a DISPLAY.
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: Wed Aug 17, 2011 10:46 pm    Post subject:
Reply with quote

Hello,

Where does this:
//SYSOUT DD SYSOUT=($,,STAN)
send the output? It may not be the spool and you may need to ask your support where this is routed. . .

Quote:
EXHIBIT NAMED will have to become a DISPLAY
Will become:
DISPLAY "fieldname literal" fieldname.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Wed Aug 17, 2011 11:10 pm    Post subject: Reply to: Any Way by which Display can be suppressed -
Reply with quote

EXHIBIT was a debugging thing, really.

EXHIBIT (simple display)
EXHIBIT NAMED (display field name and content)
EXHINIT NAMED CHANGED (display field name and content if different from previous execution of that particular EXHIBIT)

Handy in a way, though I only used it for fun.

TRANSFORM data-name FROM literal/field to literal/field.

I used for upper- to lower-case translation.

INSPECT fully covers TRANSFORM.

I don't know why EXHIBIT disappeared, I guess it was an "IBM Extension".
Back to top
View user's profile Send private message
saurabh39
Warnings : 1

Active User


Joined: 11 Apr 2008
Posts: 144
Location: Jamshedpur

PostPosted: Thu Aug 18, 2011 1:04 am    Post subject: Reply to: Any Way by which Display can be suppressed -
Reply with quote

Quote:
Is it possible that the wrong compiler is being used?


I dont think so, as the last time program was changed was in 2003, and from then no changes have been made. It might be possible the program was compiled with correct compiler and somehow compiler changed and these programs remained same.

Quote:
What error is shown for the COPY?

A "PICTURE" clause was not found for elementary item
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Thu Aug 18, 2011 1:19 am    Post subject: Reply to: Any Way by which Display can be suppressed -
Reply with quote

What compiler are you using now?
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 Aug 18, 2011 1:26 am    Post subject:
Reply with quote

Hello,

What is the statement immediately before the COPY?

Also, there may be a problm within the copybook - like a missing period.
Back to top
View user's profile Send private message
saurabh39
Warnings : 1

Active User


Joined: 11 Apr 2008
Posts: 144
Location: Jamshedpur

PostPosted: Thu Aug 18, 2011 1:32 am    Post subject: Reply to: Any Way by which Display can be suppressed -
Reply with quote

Even compiler I am using is quite a old one -
IBM VS COBOL II Release 4.0 09/15/92
Back to top
View user's profile Send private message
saurabh39
Warnings : 1

Active User


Joined: 11 Apr 2008
Posts: 144
Location: Jamshedpur

PostPosted: Thu Aug 18, 2011 1:36 am    Post subject: Reply to: Any Way by which Display can be suppressed -
Reply with quote

@Dick -

Everything is fine before the COPY statement. But one difference, I had noticed earlier was, the program has -

01 STATE-END-NARR COPY WCSJ9000.

The level number in program is 01, and in the copybook also the level number is 01 only, which as per latest rule is not correct.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Thu Aug 18, 2011 1:44 am    Post subject: Reply to: Any Way by which Display can be suppressed -
Reply with quote

Mmmm... have a look at your compiler options. See if there is something which says CMPR2 or, more likely, NOCMPR2.

If you see NOCMPR2, try adding

Code:
            CBL CMPR2


before the ID Division.

This is just a test to see if the thing will then compile. To actually use it, you'd have to get the gohead from your boss.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Thu Aug 18, 2011 3:55 am    Post subject: Reply to: Any Way by which Display can be suppressed -
Reply with quote

Ignore my last post. That is for compatability with Cobol II in early Enterprise Cobol. You are using Cobol II, so "compatability" with Cobol II is not remotely germane.

Either you have to dig out the VS Cobol compiler that was used last time. Or you have to "convert" the code. In addition to things previously mentioned, remove the 01 in front of the copybook and changes references to from that to the 01 in the copybook.

Is this a called module, or does it call other modules?

If you look in the Cobol II manual, at the front, there should be some notes on "migration" to Cobol II. Possibly (I haven't checked, but I'd guess so) a "migration guide" is available. Read these and see if the program is doing anything else which might be problematic.
Back to top
View user's profile Send private message
saurabh39
Warnings : 1

Active User


Joined: 11 Apr 2008
Posts: 144
Location: Jamshedpur

PostPosted: Thu Aug 18, 2011 9:39 am    Post subject: Reply to: Any Way by which Display can be suppressed -
Reply with quote

@Bill - The problem was not as big as I thought. For some reason in my client org, test region has newer compiler but production is still using ancient compiler. As of now, I am able to compile the job using prod compiler.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Thu Aug 18, 2011 11:41 am    Post subject: Reply to: Any Way by which Display can be suppressed -
Reply with quote

OK, and your original query about the DISPLAY stuff. Is that OK now as well?
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
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to display value of an exit param... lind sh CICS 2 Sun Oct 09, 2016 12:28 pm
This topic is locked: you cannot edit posts or make replies. DSList (3.4) cannot display Chinese c... jacobdng TSO/ISPF 4 Wed Oct 05, 2016 2:51 pm
This topic is locked: you cannot edit posts or make replies. Get and display content of an address... lind sh CICS 1 Mon Aug 08, 2016 9:18 am
No new posts How to display data in separate lines... salilnigam1970 DFSORT/ICETOOL 2 Tue Jan 26, 2016 9:49 pm
No new posts How to display data in separate lines... salilnigam1970 JCL & VSAM 6 Tue Jan 26, 2016 5:30 pm


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