View previous topic :: View next topic
|
Author |
Message |
saurabh39 Warnings : 1 Active User
Joined: 11 Apr 2008 Posts: 144 Location: Jamshedpur
|
|
|
|
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 |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
How is SYSOUT defined in your JCL? |
|
Back to top |
|
|
saurabh39 Warnings : 1 Active User
Joined: 11 Apr 2008 Posts: 144 Location: Jamshedpur
|
|
|
|
Hi Craq,
The sysout is -
//SYSOUT DD SYSOUT=($,,STAN) |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
saurabh39 Warnings : 1 Active User
Joined: 11 Apr 2008 Posts: 144 Location: Jamshedpur
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
saurabh39 Warnings : 1 Active User
Joined: 11 Apr 2008 Posts: 144 Location: Jamshedpur
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
What compiler are you using now? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
saurabh39 Warnings : 1 Active User
Joined: 11 Apr 2008 Posts: 144 Location: Jamshedpur
|
|
|
|
Even compiler I am using is quite a old one -
IBM VS COBOL II Release 4.0 09/15/92 |
|
Back to top |
|
|
saurabh39 Warnings : 1 Active User
Joined: 11 Apr 2008 Posts: 144 Location: Jamshedpur
|
|
|
|
@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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
saurabh39 Warnings : 1 Active User
Joined: 11 Apr 2008 Posts: 144 Location: Jamshedpur
|
|
|
|
@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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
OK, and your original query about the DISPLAY stuff. Is that OK now as well? |
|
Back to top |
|
|
saurabh39 Warnings : 1 Active User
Joined: 11 Apr 2008 Posts: 144 Location: Jamshedpur
|
|
|
|
@Bill - Display is still confounding me, In test I can see the display but in production that display is missing. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
saurabh39 Warnings : 1 Active User
Joined: 11 Apr 2008 Posts: 144 Location: Jamshedpur
|
|
|
|
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 |
|
|
saurabh39 Warnings : 1 Active User
Joined: 11 Apr 2008 Posts: 144 Location: Jamshedpur
|
|
|
|
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 |
|
|
|