IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Any Way by which Display can be suppressed


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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
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
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: 8696
Location: Dubuque, Iowa, USA

PostPosted: Wed Aug 17, 2011 8:33 pm
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
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: 8696
Location: Dubuque, Iowa, USA

PostPosted: Wed Aug 17, 2011 9:33 pm
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
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

Moderator Emeritus


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

PostPosted: Wed Aug 17, 2011 9:42 pm
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Aug 17, 2011 10:08 pm
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

Moderator Emeritus


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

PostPosted: Wed Aug 17, 2011 10:46 pm
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Aug 17, 2011 11:10 pm
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
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Aug 18, 2011 1:19 am
Reply with quote

What compiler are you using now?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Thu Aug 18, 2011 1:26 am
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
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
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Aug 18, 2011 1:44 am
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Aug 18, 2011 3:55 am
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
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Aug 18, 2011 11:41 am
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
saurabh39
Warnings : 1

Active User


Joined: 11 Apr 2008
Posts: 144
Location: Jamshedpur

PostPosted: Thu Aug 18, 2011 7:13 pm
Reply with quote

@Bill - Display is still confounding me, In test I can see the display but in production that display is missing.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Aug 18, 2011 7:26 pm
Reply with quote

What's the compile / link date for the production version? Possibly the code has been changed since the production version was put out there?
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Aug 18, 2011 9:24 pm
Reply with quote

Tushar,

Do you have a compile listing of the production program?

Did you get the source from a production library?

Have you checked compile and link time, like Robert suggested?

Did you find an answer for Dick's question about where the SYSOUT is actually routed?

Can you post the production JCL (masked appropriately)?

Can you outline the original problem which has led you to this problem with the apparently (sic) invisible displays?
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 10:59 pm
Reply with quote

Quote:
Do you have a compile listing of the production program?

No. In production compile job, compressed lsiting is populated in a temporary library, but the temp library is not copied to permanent lib down the line.

Quote:
Did you get the source from a production library?

Yes.

Quote:
Have you checked compile and link time, like Robert suggested?


In the loadmodule, the time is 24 June 1998. But in panvalet for the same module i can see two timestamp -
LMAINT LACCESS
-------- --------
06/24/98 04/29/03
I am not sure of the significance of LACCESS.

Quote:
Did you find an answer for Dick's question about where the SYSOUT is actually routed?

I haven't talked to support for this, as they are not very good people to talk to, if you have technical question which a developer should himself know. But i have talked to other seniors and they say, it should direct to spool itself.
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 11:01 pm
Reply with quote

JCL is-
Code:

//WCPLDD03 EXEC PGM=DFSRRC00,COND=(0,LT),TIME=25,           
//             PARM='DBB,&MBR,&PSB,&BUF,&SPIE&TEST'         
//STEPLIB  DD  DSN=XXXXX.APFLIB,DISP=SHR           
//         DD  DSN=XXXXX.RESLIB,DISP=SHR           
//         DD  DSN=XXXXX.PGMLIB,DISP=SHR               
//DFSRESLB DD  DSN=XXXXX.APFLIB,DISP=SHR           
//         DD  DSN=XXXXX.RESLIB,DISP=SHR           
//SORTLIB  DD  DSN=XXXXX.SORTLIB,DISP=SHR                   
//IMSACB   DD  DSN=XXXXX.ACBLIB,DISP=SHR             
//DFSVSAMP DD  DSN=XXXXX.DFSVSAMP(DFSVSAMP),DISP=SHR   
//SYSOUT   DD  SYSOUT=($,,STAN)                             
//SYSOUA   DD  SYSOUT=($,,STAN)                             
//SYSUDUMP DD  SYSOUT=T,DEST=VOR,HOLD=YES                   
//SYSDBOUT DD  SYSOUT=T,DEST=VOR,HOLD=YES                   
//IEFRDER  DD  DUMMY,DCB=(RECFM=VBS,LRECL=1400,BLKSIZE=1408)
//SORTWK01 DD  UNIT=SORT,SPACE=(CYL,&CYL)                   
//SORTWK02 DD  UNIT=SORT,SPACE=(CYL,&CYL)                   
//SORTWK03 DD  UNIT=SORT,SPACE=(CYL,&CYL)                             
//CONDCODE DD  DSN=&&CONDCODE,DISP=(,PASS),UNIT=SYSDA,                 
//             SPACE=(80,1),DCB=BUFNO=1                               
//F1       DD  DSN=XXXX(0),DISP=SHR                     
//F2       DD  DSN=XXXX,DISP=SHR                       
//F3       DD  DSN=XXXX,DISP=OLD                       
//F4       DD  DSN=XXXX,DISP=(MOD,KEEP)                 
//F5       DD  DSN=XXXX,DISP=SHR                       
//F6       DD  DSN=XXXX,DISP=SHR                       
//F7       DD  DSN=&&XXXX,DISP=(,DELETE,DELETE),                   
//             SPACE=(CYL,(6,5)),                                     
//             DCB=...,UNIT=SYSDA       
//F8       DD  DSN=&&XXXX,DISP=(,DELETE),UNIT=SYSDA,                 
//             DCB=....,                 
//             SPACE=(CYL,(&CYL,&CYL))


And I was looking for logic to reset the internal return code in the program. Before there logic there is a display, which is not getting displayed in production, but when i run the same load module in test, i can see the display.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming Goto page 1, 2  Next

 


Similar Topics
Topic Forum Replies
No new posts How to display the leading zeros of a... DB2 7
No new posts SDSF display Max-RC in different colors TSO/ISPF 4
No new posts Converting a file from PD to display ... SYNCSORT 4
No new posts Unable to display comp variable COBOL Programming 4
No new posts Adding FIND to ISPF Panel display of ... TSO/ISPF 3
Search our Forums:

Back to Top