MF Cobol/AIX 4.1/DCE problem 
Author Message
 MF Cobol/AIX 4.1/DCE problem

Hi,

We've been writing MF COBOL 3.2 apps with Encina/DCE and C code for some months
on AIX 3.2.5. Recently we've moved to AIX 4.1.4 and the new DCE 2.1. Now, some
of our code breaks. The code that actually fails is in a DCE function
"uuid_to_string". If we call the same code from C it all works fine - it's
only from COBOL that it fails. We were advised that we should move to the
new MF COBOL 4.0 on AIX 4 - we did this with no success. Has anyone else seen
these sorts of problems? Below is a program (very similar to that
shown in the MF COBOL DCE Programmer's Guide) that breaks on AIX 4.1.4:

---------- uuid.cbl --------------

*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
* UUID test
*
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
identification division.
$set sourceformat(fixed)
       copy "dce.cpy".
      $set sourceformat(free)

program-id. FMDGETUUID.

environment division.

data division.

*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

working-storage section.

01 ws-size1             pic 9(9) comp-5.
01 ws-size2             pic 9(9) comp-5.
01 ws-count             pic 9(9) comp-5.
01 ws-fcntr             pic 9(9) comp-5.
01 ws-tcntr             pic 9(9) comp-5.
01 ws-status            usage uns-long.
01 ws-length            usage uns-long.
01 ws-uuid              usage uuid-t.
01 ws-uuid-text         pic x(50).

01 ls-uuid-short                pic x(32).
01 ws-uuid-ptr          usage data-pointer.

*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*linkage section.

*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

*procedure division using ls-uuid-short.
procedure division.

*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

A000-MAIN-LINE SECTION.

        display "------ calling uuid_create -------"
        call "uuid_create" using
                by reference ws-uuid
                by reference ws-status

        if ws-status NOT = 0
                display "FMDGETUUID uuid_create Failed with status = "
                        ws-status
                perform Z000-FINISH
        end-if
*        display "ws-uuid = " ws-uuid

        display "------ calling uuid_to_string -------"
        call "uuid_to_string" using
                by reference ws-uuid
                by reference ws-uuid-ptr
                by reference ws-status

        if ws-status NOT = 0
                display "FMDGETUUID uuid_to_string Failed with status = "
                        ws-status
                perform Z000-FINISH
        end-if

        display "------ calling CBL_DCE_STRING_COPY -------"
        move length of ws-uuid-text to ws-length
        call "CBL_DCE_STRING_COPY" using
                ws-uuid-ptr
                ws-uuid-text
                ws-length
                ws-status

        display "ws-uuid-text = " ws-uuid-text

        move 1 to ws-fcntr ws-tcntr
        move spaces to ls-uuid-short
        move FUNCTION LENGTH(ws-uuid-text) to ws-size1
        move FUNCTION LENGTH(ls-uuid-short) to ws-size2
        if ws-size1 > ws-size2
            move ws-size2 to ws-count
        else
            move ws-size1 to ws-count
        end-if

        perform ws-count times
            if ws-uuid-text(ws-fcntr:1) NOT = "-"
                move ws-uuid-text(ws-fcntr:1) to ls-uuid-short(ws-tcntr:1)
                add 1 to ws-tcntr
            end-if
            add 1 to ws-fcntr
        end-perform

        display ls-uuid-short
        perform Z000-FINISH.

A000-EXIT.
    EXIT.

*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

Z000-FINISH SECTION.
    exit program.

Z000-EXIT.
    exit.
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

----------- Makefile --------------------

#
# Makefile to build uuid
#
#-------------------------------------------------------------------------

FMD_STD_ROOT = /btal/dev/fmd/fmdd_rel/std/v0002000

INCLUDE_DIR     = $$FMD_STD_ROOT/ref

include $(FMD_STD_ROOT)/ref/$(OS)_rules.mak
include $(FMD_STD_ROOT)/ref/rules_encina.mak

Article Unavailable



Fri, 23 Apr 1999 03:00:00 GMT  
 MF Cobol/AIX 4.1/DCE problem

Quote:

> Hi,

> We've been writing MF COBOL 3.2 apps with Encina/DCE and C code for some months
> on AIX 3.2.5. Recently we've moved to AIX 4.1.4 and the new DCE 2.1. Now, some
> of our code breaks. The code that actually fails is in a DCE function
> "uuid_to_string". If we call the same code from C it all works fine - it's
> only from COBOL that it fails.

Hi John. I'd like to help, but I'm afraid I don't have an equivalent setup here
to run your demo program on. Can you tell me how the call fails - bad return
code or something else ? I guess the first thing I'd check is that the typedefs
in dce.cpy are not in error.

Cheers, Kev.

--

These views are strictly my own. I doubt that anyone else would want them.
STUFF FOR SALE: <A HREF="http://ds.dial.pipex.com/kevin.digweed/">Here!</A>



Sun, 25 Apr 1999 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Problem with Tcl 8.0 load on AIX 3.2.5, AIX 4.1

2. HELP: Cobol 4.1 rev 30 and AIX 4.3.3 on an F80

3. Sorting...on Unix using MF COBOL 4.1

4. MF Cobol 4.1, Error in MOVE

5. Error 196-S on MF COBOL 4.1

6. Fortran Executable from AIX 3.1.2 used under AIX 4.1

7. MF Cobol/AIX/MQDISC problem

8. Help MF COBOL on AIX problem

9. Configuration problem on AIX 4.1

10. Oratcl / AIX 4.1 problem

11. Problem with TCL8.0 test suite under AIX 4.1

12. Tk refresh problem on AIX 4.1

 

 
Powered by phpBB® Forum Software