Jim McAlpine wrote:
I'm trying to convert the following pseudo code to run under COBOL -
DCL TCCSID CHAR(5); /* TERMINAL CCSID */
CALL ISPLINK('VDEFINE','ZTERMCID',TCCSID,'CHAR',
LENGTH(TCCSID));
CALL ISPLINK('VGET ','ZTERMCID','SHARED ');
and I've come up with -
WORKING-STORAGE SECTION.
01 TCCSID PIC X(5).
01 LCCSID PIC S9(8) VALUE 5.
01 VDEFINE PIC X(8) VALUE 'VDEFINE '.
01 ZTERMCID PIC X(8) VALUE 'ZTERMCID'.
01 CHAR PIC X(4) VALUE 'CHAR'.
01 VGET PIC X(8) VALUE 'VGET '.
01 SHARED PIC X(8) VALUE 'SHARED '.
PROCEDURE DIVISION.
CALL 'ISPLINK' USING
VDEFINE ZTERMCID TCCSID CHAR LCCSID.
DISPLAY RETURN-CODE UPON SYSOUT.
CALL 'ISPLINK' USING
VGET ZTERMCID SHARED.
DISPLAY RETURN-CODE UPON SYSOUT.
DISPLAY TCCSID UPON SYSOUT
GOBACK.
Items have to be in a specified order; for VDEFINE its:
VDEFINE - the verb; you're OK there
name-list - you have ZTERMCID, looks OK
variable - you have TCCSID, 5 byte area where value is to
be placed; looks OK
format - you have CHAR; OK
length - you have LCCSID; this must be a fullword
binary integer; you have 8 bytes of
display;
Try chaning LCCSID to be defined as:
LCCSID pic s9(8) binary value 5.
but I'm getting rc=20 - severe error from both calls to ISPLINK. It's 20
years since I've done any of this stuff and I've been looking at it all
afternoon without success. Can someone put me out of my Friday afternoon
misery please. Is it time to go home yet.
Hard to say: what time zone are you in?
Kind regards,
-Steve Comstock
The Trainer's Friend, Inc.
303-393-8716
http://www.trainersfriend.com
z/OS Application development made easier
* Our classes include
+ How things work
+ Programming examples with realistic applications
+ Starter / skeleton code
+ Complete working programs
+ Useful utilities and subroutines
+ Tips and techniques
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html