COBOL CALL TO ASM



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

COBOL CALL TO ASM

Postby tsreddyusa » Fri Jul 30, 2010 7:29 am

COBOL PROGRAM

01 PARM-STRING PIC X(20).
01 PARM-STRING-LEN PIC S9(9) COMP VALUE 1.

PROCEDURE DIVISION.

STRING 'ABC,DEF,GHI' DELIMITED BY SIZE INTO PARM-STRING
USING POINTER PARM-STRING-LEN.

SUBTRACT 1 FROM PARM-STRING-LENGTH

CALL 'ASMPGM' USING PARM-STRING
PARM-STRING-LENGTH

ASMPGM IS VENDOR PROGRAM.SO I AM NOT SURE HOW IT WAS CODED. ACCORDING TO USER GUIDE
FIRST PARM IS ADDRESS OF INPUT STRING (4 BYTES) AND SECOND PARM IS ADDRESS OF INPUT STRING LENGTH (4 BYTES)
BUT FOR SOME REASON ASMPGM DOES NOT STOP AFTER THE LENGTH. IT KEEPS ON PROCESSING DATA BEYOND THE ADDRESS OF
INPUT STRING. COULD SOMEBODY PLEASE HELP ?
tsreddyusa
 
Posts: 3
Joined: Wed Jun 16, 2010 5:25 am
Has thanked: 0 time
Been thanked: 0 time

Re: COBOL CALL TO ASM

 

Re: COBOL CALL TO ASM

Postby Robert Sample » Fri Jul 30, 2010 8:49 am

I suspect this might work better (also note the use of the Code tag):
01 PARM-STRING PIC X(20).
01 PARM-STRING-LEN PIC S9(9) COMP VALUE 1.

PROCEDURE DIVISION.

STRING 'ABC,DEF,GHI' DELIMITED BY SIZE INTO PARM-STRING.

MOVE 11 TO PARM-STRING-LENGTH.

CALL 'ASMPGM' USING PARM-STRING
                    PARM-STRING-LENGTH
Robert Sample
Global moderator
 
Posts: 3367
Joined: Sat Dec 19, 2009 8:32 pm
Location: East Dubuque, Illinois
Has thanked: 1 time
Been thanked: 222 times

Re: COBOL CALL TO ASM

Postby tsreddyusa » Fri Jul 30, 2010 8:08 pm

Robert, did not work. same issue..reading data beyond the length.
tsreddyusa
 
Posts: 3
Joined: Wed Jun 16, 2010 5:25 am
Has thanked: 0 time
Been thanked: 0 time

Re: COBOL CALL TO ASM

Postby Robert Sample » Fri Jul 30, 2010 8:39 pm

Perhaps you should contact the vendor for assistance, then?
Robert Sample
Global moderator
 
Posts: 3367
Joined: Sat Dec 19, 2009 8:32 pm
Location: East Dubuque, Illinois
Has thanked: 1 time
Been thanked: 222 times


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post