Steve Comstock wrote:
>
> 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.
I find that using the ISPF 'MODEL' command is useful when writing ISPF
programs. Make sure you're editting a PDS with a name such as
MYNAME.TEST.COBOL and then issue 'MODEL WORKSTORE' and the 'a' line
command where you would like the working storage fields entered. Then go
down to the procedure division and to a 'MODEL VDEFINE' for a sample and
=NOTE= comments. Same for the other ISPF services. Do 'MODEL' by itself
to bring up a list of all the services.
>
> >
> > 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
--
Don Poitras - zSeries R & D - SAS Institute Inc. - SAS Campus Drive
mailto:[EMAIL PROTECTED] (919)531-5637 Fax:677-4444 Cary, NC 27513
----------------------------------------------------------------------
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