|
|
| Author |
Message |
diwakar_rao
New User
Joined: 04 Mar 2007 Posts: 7 Location: Chennai
|
|
|
|
Hi,
I am migrating the below code in PL/1 to COBOL
PL/1
===
DCL PTR3 POINTER;
DCL CHAR4 CHAR(4) BASED(PTR3);
PTR3->CHR4='ABCD';
COBOL
=====
01 PTR3 POINTER in LOCAL STORAGE SECTION
01 CHAR4 PIC x(4) in LINKAGE SECTION
SET ADDRESS OF CHAR4 TO PTR3
SET PTR3 TO ADDRESS OF CHAR4
MOVE "ABCD" TO CHAR(4)
But i am getting SOC4 abend when i run in COBOL
Regards,
Bharat |
|
| Back to top |
|
 |
References
|
Posted: Tue May 13, 2008 4:55 pm Post subject: Re: SOC4 abend while migrating the PL/1 code to COBOL |
 |
|
|
 |
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 1142 Location: At my desk
|
|
|
|
How are you getting the address of CHAR4?
Is this a called subroutine?
Does the PROCEDURE DIVISION have a USING CHAR4? |
|
| Back to top |
|
 |
dbzTHEdinosauer
Senior Member
Joined: 20 Oct 2006 Posts: 1393 Location: germany
|
|
|
|
SET ADDRESS OF CHAR4 TO PTR3
what does ptr3 contain when the above is executed.
| Code: |
SET ADDRESS OF CHAR4 TO PTR3
SET PTR3 TO ADDRESS OF CHAR4
MOVE "ABCD" TO CHAR(4)
|
the two set commands make no sense in cobol. also, I hope the CHAR(4) is a typo. |
|
| Back to top |
|
 |
|
|