View previous topic :: View next topic
|
Author |
Message |
blackzero
New User
Joined: 20 Mar 2008 Posts: 6 Location: INDIA
|
|
|
|
Hey Guys,
I facing a problem in using Declaratives in procedure division. Plz see my code below and suggest me if i am doing anything wrong. |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
What problem are you having. |
|
Back to top |
|
|
blackzero
New User
Joined: 20 Mar 2008 Posts: 6 Location: INDIA
|
|
|
|
This code when runs should normally display the debug status like program start line number, procedure name etc sysout of the spool but in my case its not displaying anything. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Please post the jcl and spooled output from the step.
You may see nothing due to a missing dd statement. If this is the case, there should be a "dd statement missing" message somewhere.
When you post code, please do not use a screen capture. It just makes a mess. . . If you post the code via copy/paste and "Code" it using the Code tag, i'll replace your image with the text code so your post will be easier to use. |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
Change
Code: |
*SOURCE COMPUTER. IBM-370 WITH DEBUGGING MODE.
SOURCE COMPUTER. IBM-370.
|
to
Code: |
SOURCE COMPUTER. IBM-370 WITH DEBUGGING MODE.
*SOURCE COMPUTER. IBM-370.
|
[/code] |
|
Back to top |
|
|
blackzero
New User
Joined: 20 Mar 2008 Posts: 6 Location: INDIA
|
|
|
|
Here is my JCL
Code: |
//EXECU EXEC PGM=REXXTEST
//STEPLIB DD DSN=ABC.RUNLIB.LOAD,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
/*
|
and this is SYSOUT
Code: |
********************************* TOP OF DATA **********************************
Hey - - -
******************************** BOTTOM OF DATA ********************************
|
|
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
Until you change the SOURCE COMPUTER statement you won't get any output from the debug section.
Quote: |
When the debugging mode is suppressed by not specifying that option of the SOURCE compiler, any USE FOR DEBUGGING declarative procedures and all debugging lines are inhibited. |
|
|
Back to top |
|
|
blackzero
New User
Joined: 20 Mar 2008 Posts: 6 Location: INDIA
|
|
|
|
Yes, i have changed the code. this is my code now -
Code: |
Identification Division.
Program-Id. rexxtest.
Environment Division.
Configuration Section.
Source-Computer. IBM-370 With debugging Mode.
*Source-Computer. IBM-370.
Object-Computer. IBM-370.
Input-Output Section.
Data Division.
Working-Storage Section.
Procedure Division.
DECLARATIVES.
DEBUG SECTION.
USE FOR DEBUGGING ON ALL PROCEDURES.
000-DEBUG-TRACE.
DISPLAY DEBUG-NAME DEBUG-CONTENTS "LINE =" DEBUG-LINE.
END DECLARATIVES.
0000-Main Section.
Hey-Manjulam.
Display 'Hey - - - '
.
0000-Main-Exit.
Stop Run.
|
JCL is same as above
still i am getting the same output. |
|
Back to top |
|
|
ashimer
Active Member
Joined: 13 Feb 2004 Posts: 551 Location: Bangalore
|
|
|
|
What was the TEST parm given to COBOL compiler ? |
|
Back to top |
|
|
Mickeydusaor
Active User
Joined: 24 May 2006 Posts: 258 Location: Salem, Oregon
|
|
|
|
looks like you have missed a few required fields. This is how I got this to work.
Code: |
01 WS-DEBUG-INFO.
05 WS-DEBUG-FLAG PIC X(01) VALUE ' '.
88 WS-DEBUG-ON VALUE 'O'.
05 WS-DEBUG-ITEM.
10 WS-DEBUG-LINE PIC X(06) VALUE SPACES.
10 FILLER PIC X(01) VALUE SPACES.
10 WS-DEBUG-NAME PIC X(30) VALUE SPACES.
10 FILLER PIC X(01) VALUE SPACES.
10 WS-DEBUG-SUB1 PIC X(05) VALUE SPACES.
10 FILLER PIC X(01) VALUE SPACES.
10 WS-DEBUG-SUB2 PIC X(05) VALUE SPACES.
10 FILLER PIC X(01) VALUE SPACES.
10 WS-DEBUG-SUB3 PIC X(05) VALUE SPACES.
10 FILLER PIC X(01) VALUE SPACES.
10 WS-DEBUG-CONT PIC X(30) VALUE SPACES.
PROCEDURE DIVISION.
DECLARATIVES.
DEBUG-TRACE SECTION.
USE FOR DEBUGGING ON ALL PROCEDURES
.
DEBUG-ACTION.
SET WS-DEBUG-ON TO TRUE
INITIALIZE WS-DEBUG-ITEM
MOVE DEBUG-LINE TO WS-DEBUG-LINE
MOVE DEBUG-NAME TO WS-DEBUG-NAME
MOVE DEBUG-SUB-1 TO WS-DEBUG-SUB1
MOVE DEBUG-SUB-2 TO WS-DEBUG-SUB2
MOVE DEBUG-SUB-3 TO WS-DEBUG-SUB3
MOVE DEBUG-CONTENTS TO WS-DEBUG-CONT
DISPLAY WS-DEBUG-ITEM
.
END DECLARATIVES
.
/
//STEP010 EXEC PGM=XXXTEST1,PARM='/DEBUG' |
|
|
Back to top |
|
|
ashimer
Active Member
Joined: 13 Feb 2004 Posts: 551 Location: Bangalore
|
|
|
|
Mickey ... whtever blackzero has shown is right .... and whtever u have shown is exactly wht was pictured earlier ... but in a different manner ... i think the compiler option TEST has something to do with this ... TEST(NONE) will not allow debugging ..instead it shud be TEST(ALL) or TEST(ALL,SYM) ... |
|
Back to top |
|
|
Mickeydusaor
Active User
Joined: 24 May 2006 Posts: 258 Location: Salem, Oregon
|
|
|
|
ashimer, as this was stated in one of the previous solutions, I did not repeat this... |
|
Back to top |
|
|
|