View previous topic :: View next topic
|
Author |
Message |
ksivapradeep
New User
Joined: 30 Jul 2004 Posts: 95
|
|
|
|
when i am passing values to the program using parm parameter the coding is
DATA DIVISION.
WORKING-STORAGE SECTION.
77 C PIC 9(4).
LINKAGE SECTION.
01 P-LENGTH PIC 9(3).
01 GR-1.
05 A PIC 9(2).
05 B PIC 9(2).
PROCEDURE DIVISION USING GR-1.
COMPUTE C = A + B.
DISPLAY C.
STOP RUN.
=========
i passed PARM=(2,2),then got s0c7 abend
i know the way of rectifying it,i got the PU OFFSET address +00000254 in CEEDUMP then i copied last 4 digits(0254) and in SYSPRINT (compile time)
i typed that offset address as F ALL 0254 but the s0c7 effected data item didnt highlighted what i have to do is there any thing wrong please help me |
|
Back to top |
|
|
bluebird
Active User
Joined: 03 Feb 2004 Posts: 127
|
|
|
|
ND you should pass PARM=(0202)
unless you add a filler (PIC X(1)) between the two variables
in which case you should pass PARM=(02,02)
hope it helps |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
bluebird, maybe it's how I'm reading the post, but I think the poster was intentionally creating the S0C7 error, and was seeking information on how to resolve this type of error by looking at the contents of the the program dump. |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Hi K,
I congratulate you for not asking for a solution to your problem, but for help in solving it.
What you might try is to recompile your pgm using LIST,NOOFF as 2 of your compiler parm options. This will give you a listing containing the actual assembler language instructions generated by your COBOL code.
Then re-execute your pgm and do exactly what you did before. But be aware that "F ALL 0254 " will point you not to the data area, but to the failing assembler instruction.
Also, you might want to re-read the manual section on defining the parm field in the Linkage Section of the pgm.
Good luck and keep us informed of your progress. |
|
Back to top |
|
|
|