[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference hydra::axp-developer

Title:Alpha Developer Support
Notice:[email protected], 800-332-4786
Moderator:HYDRA::SYSTEM
Created:Mon Jun 06 1994
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:3722
Total number of notes:11359

3628.0. "Autodealing - Point 28463" by KZIN::ASAP () Fri May 16 1997 03:53

    Company Name :  Autodealing - Point 28463
    Contact Name :  Declan O'Connell
    Phone        :  353 1 6766455
    Fax          :  
    Email        :  [email protected]
    Date/Time in :  16-MAY-1997 07:53:15
    Entered by   :  Nick Hudson
    SPE center   :  REO

    Category     :  vms
    OS Version   :  
    System H/W   :  


    Brief Description of Problem:
    -----------------------------

From:	RDGENG::MRGATE::"RDGMTS::PMDF::mail.dec.com::Santing" 16-MAY-1997 07:44:39.28
To:	RDGENG::ASAP
CC:	
Subj:	ESCALATION: POINT  28463, Company  Autodealing

From:	NAME: Ben Santing <[email protected]@PMDF@INTERNET>
To:	NAME: '[email protected]' <IMCEAX400-c=US+3Ba=+20+3Bp=DIGITAL+3Bo=SBUEURMFG+3Bdda+3ASMTP=asap+40reo+2Emts+2Edec+2Ecom+3B@mail.dec.com@PMDF@INTERNET>

Hello -

POINT Log Number	 28463
Company Name 	Autodealing
Engineers name	Declan O'Connell
Telephone Number 	353 1 6766455.	
Fax Number		
E-mail Address	[email protected]

Operating System, Version	OpenVMS Alpha Pascal
Platform			

Problem Statement		

Another problem I tried to solve without success:

The problem is still occurring even though we are compiling with 
/ALIGN=VAX and I have also put the [ALIGN(VAX)] above the TYPE 
section.
Any other ideas ??
Really, I need a very rapid turn-around on this - I need a solution 
asap.
Thanks,
Declan.

Subject:	Porting VAX code to an ALPHA.


Hello,

my name is Declan O'Connell from a company called AutoDealing Software 
Ltd, ( ASAP ref. D60651 ).
I'm having some difficulty porting code which works on a VAX to an
ALPHA - I would appreciate your assistance as soon as possible. Phone 
number here is (01) 6766455.

Here are the details:

Basically, I'm trying to map a port ( on a terminal server ) from
within a PASCAL program.
The program is running under VMS 6.2 on an ALPHA.

Compilation command is as follows :
$ PASCAL/enum=byte/align=vax /NOWARN CT_PORT.PAS/DEBUG/NOOPT

I am receiving the message "%SYSTEM-F-BADPARAM, bad parameter value"
back from the call to $QIOW.

Here's the code :

(*--------------------------------------------------------------------- 
-------*)

[GLOBAL,ASYNCHRONOUS]
FUNCTION lat_map_port( port_chan : UWORD;
                       node : PACKED ARRAY [LB1..UB1:INTEGER] OF
CHAR;
                       port : PACKED ARRAY [LB2..UB2:INTEGER] OF
CHAR;
                       lat_link : PACKED ARRAY [LB3..UB3:INTEGER] OF
CHAR ) :
         UNSIGNED;

TYPE

  LAT_MAP_ITEMLIST = RECORD
    node_len : WORD;
    node_func : WORD;
    node_addr : INTEGER;
    node_term : INTEGER;
    port_len : WORD;
    port_func : WORD;
    port_addr : INTEGER;
    port_term : INTEGER;
    link_len : WORD;
    link_func : WORD;
    link_addr : INTEGER;
    link_term : INTEGER;
    term : INTEGER;
  END;

VAR
  rc : UNSIGNED;
  func : P_STR_10;
  err_msg : P_STR_80;
  iosb : IOSB_STR;
  item_list : LAT_MAP_ITEMLIST;

BEGIN

  func := 'MAP_PORT  ';
  err_msg := ZERO;

  item_list.node_len := UB1;
(*  item_list.node_func := IO$M_LT_MAP_NODNAM;*)
  item_list.node_func := 1;
  item_list.node_addr := IADDRESS( node );
  item_list.node_term := 0;

  item_list.port_len := UB2;
(*  item_list.port_func := IO$M_LT_MAP_PORNAM;*)
  item_list.port_func := 2;
  item_list.port_addr := IADDRESS( port );
  item_list.port_term := 0;

  item_list.link_len := UB3;
(*  item_list.link_func := IO$M_LT_MAP_LNKNAM;*)
  item_list.link_func := 4;
  item_list.link_addr := IADDRESS( lat_link );
  item_list.link_term := 0;

  item_list.term := 0;

  rc := $QIOW(
               CHAN := %IMMED port_chan,
               FUNC := %IMMED (IO$_TTY_PORT + IO$M_LT_MAP_PORT),
               IOSB := %REF iosb,
               P1   := %REF item_list
             );

  IF rc <> SS$_NORMAL THEN
    rpt_err( func, 1, sys_err, rc, err_msg );

  rc := iosb.cond;

  IF rc <> SS$_NORMAL THEN
    rpt_err( func, 2, sys_err, rc, err_msg );

  lat_map_port := rc;

END;

(*--------------------------------------------------------------------- 
-------*)


Regards,

Declan.


Regards,

Ben


		   QED Qualitas Est Demonstrandum
		   ==============================
Ben Santing, Technical Consultant		Phone:  DTN 822 4285
European Customer Service Centre		Phone:  DTN 822 4330
Digital Equipment International B.V.		FAX:    DTN 822 4445

Please use our Technical Support Group E-mail: 
mailto:[email protected]




In replying, please use [email protected]




RFC-822-headers:
Received: from reoexc1.reo.dec.com by rg71rw.reo.dec.com (PMDF V5.0-7 #15552)
 id <[email protected]> for [email protected]; Fri,
 16 May 1997 07:39:30 +0100
Received: by reoexc1.reo.dec.com with SMTP
 (Microsoft Exchange Server Internet Mail Connector Version 4.0.994.63)
 id <[email protected]>; Fri, 16 May 1997 07:41:18 +0100
X-Mailer: Microsoft Exchange Server Internet Mail Connector Version 4.0.994.63
T.RTitleUserPersonal
Name
DateLines
3628.1KZIN::HUDSONThat&#039;s what I thinkFri May 16 1997 06:1437
From:	DEC:.REO.REOVTX::HUDSON       "[email protected] - UK Software
Partner Engineering 830-4121" 16-MAY-1997 10:13:14.52
To:	nm%vbormc::"[email protected]"
CC:	HUDSON
Subj:	RE:  POINT  28463, Company  Autodealing, LAT QIO

Hello Declan O'Connell

Thanks for your ASAP question on LAT QIOs.

I had a look through the database and found someone else seeing the same
problem as you (using QIO with IO$_TTY_PORT | IO$M_LT_MAP_PORT results in
BADPARAM error on Alpha but not VAX).

It turns out that this is due to a bug in LTDRIVER.  I believe the problem is
fixed in V7.

The reason for the problem is that the function code/modifier combination you
are using is for an old (and obsolete) version of LTDRIVER.  The way you should
be doing this for the current LTDRIVER is to use a SETMODE QIO.

I believe that the current LTDRIVER attempts to translates the old format to
the new, and the bug is that on Alpha it gets this wrong.

Chapter 5 of the I/O User's Reference Manual ("Terminal Driver") details the
current valid I/O function codes and modifiers for LTDRIVER.  There is an
example program in that book (Example 5-1 "LAT.C") which shows how to use the
SETMODE function code.

I hope this information is useful to you

Regards

Nick Hudson
Digital Software Partner Engineering

Chapter 5
3628.2RDGENG::HUDSONThat&#039;s what I thinkMon May 19 1997 06:07168
From:	VBORMC::"[email protected]" "Declan O'Connell" 16-MAY-1997
20:38:53.31
To:	"'[email protected] - UK Software Partner Engineering 830-4121 
16-May-1997 1013 +0100'" <[email protected]>
CC:	
Subj:	RE: POINT  28463, Company  Autodealing, LAT QIO

OK,

I've changed the code to use the SETMODE function but now I'm encountering a
different problem.

The message "%LAT-F-NOMSG, Message number 0176A184" is being returned in the
iosb.cond variable.
Any ideas ???

Here is the code I'm now using.

(*----------------------------------------------------------------------------*)

[GLOBAL,ASYNCHRONOUS]
FUNCTION lat_map_port( port_chan : UWORD;
                       node : PACKED ARRAY [LB1..UB1:INTEGER] OF CHAR;
                       port : PACKED ARRAY [LB2..UB2:INTEGER] OF CHAR;
                       lat_link : PACKED ARRAY [LB3..UB3:INTEGER] OF CHAR ) :
         UNSIGNED;

[ALIGN(VAX)]
TYPE

  LAT_MAP_ITEMLIST = RECORD
    node_func : WORD;
    node_len  : WORD;
    node_addr : INTEGER;
    port_func : WORD;
    port_len  : WORD;
    port_addr : INTEGER;
    link_func : WORD;
    link_len  : WORD;
    link_addr : INTEGER;
    term      : INTEGER;
  END;

VAR 
  rc : UNSIGNED;
  func : P_STR_10;
  err_msg : P_STR_80;
  iosb : IOSB_STR;
  item_list : LAT_MAP_ITEMLIST;
  item_list_size : WORD;

BEGIN

  func := 'MAP_PORT  ';
  err_msg := ZERO;

  item_list_size := SIZE( item_list );

  item_list.node_len := UB1;                   
  item_list.node_func := LAT$_ITM_TARGET_NODE_NAME;
  item_list.node_addr := IADDRESS( node );

  item_list.port_len := UB2;
  item_list.port_func := LAT$_ITM_TARGET_PORT_NAME;
  item_list.port_addr := IADDRESS( port );


  item_list.link_len := UB3;
  item_list.link_func := LAT$_ITM_TARGET_SERVICE_NAME;
  item_list.link_addr := IADDRESS( lat_link );

  item_list.term := 0;

  rc := $QIOW( 
               CHAN := %IMMED port_chan,
               FUNC := %IMMED (IO$_TTY_PORT + IO$M_LT_SETMODE),
               IOSB := %REF iosb,
               P1   := %REF item_list,
               P2   := %IMMED item_list_size,
               P3   := %IMMED ( LAT$C_ENT_PORT + LAT$C_ENTS_UNK )
             );

  IF rc <> SS$_NORMAL THEN
    rpt_err( func, 1, sys_err, rc, err_msg );

  rc := iosb.cond;

  IF rc <> SS$_NORMAL THEN
    rpt_err( func, 2, sys_err, rc, err_msg );

  lat_map_port := rc;

END;

(*----------------------------------------------------------------------------*)


Regards,

Declan.

----------
From: 	[email protected] - UK Software Partner Engineering 830-4121 
16-May-1997 1013 +0100[SMTP:[email protected]]
Sent: 	16 May 1997 12:01
To: 	"[email protected]"@vbormc.vbo.dec.com; [email protected]
Cc: 	[email protected]
Subject: 	RE:  POINT  28463, Company  Autodealing, LAT QIO

Hello Declan O'Connell

Thanks for your ASAP question on LAT QIOs.

I had a look through the database and found someone else seeing the same
problem as you (using QIO with IO$_TTY_PORT | IO$M_LT_MAP_PORT results in
BADPARAM error on Alpha but not VAX).

It turns out that this is due to a bug in LTDRIVER.  I believe the problem is
fixed in V7.

The reason for the problem is that the function code/modifier combination you
are using is for an old (and obsolete) version of LTDRIVER.  The way you should
be doing this for the current LTDRIVER is to use a SETMODE QIO.

I believe that the current LTDRIVER attempts to translates the old format to
the new, and the bug is that on Alpha it gets this wrong.

Chapter 5 of the I/O User's Reference Manual ("Terminal Driver") details the
current valid I/O function codes and modifiers for LTDRIVER.  There is an
example program in that book (Example 5-1 "LAT.C") which shows how to use the
SETMODE function code.

I hope this information is useful to you

Regards

Nick Hudson
Digital Software Partner Engineering

Chapter 5




% ====== Internet headers and postmarks (see DECWRL::GATEWAY.DOC) ======
% Received: from mail.vbo.dec.com (mail.vbo.dec.com [16.36.208.34]) by
vbormc.vbo.dec.com (8.7.3/8.7) with ESMTP id OAA12335 for
<[email protected]>; Fri, 16 May 1997 14:48:16 +0200
% Received: from server21.digital.fr (server21.digital.fr [193.56.15.21]) by
mail.vbo.dec.com (8.7.3/8.7) with ESMTP id PAA31560 for
<[email protected]>; Fri, 16 May 1997 15:00:37 +0200 (MET DST)
% Received: from mail (gate.autodealing.com [194.125.131.131]) by
server21.digital.fr (8.7.5/8.7) with SMTP id PAA16465 for
<[email protected]>; Fri, 16 May 1997 15:06:19 +0200 (MET DST)
% Received: from declan2.cognotec.com.15.9.194.in-addr.arpa by mail with smtp
(Smail3.1.29.1 #3) id m0wSMaj-002mLxC; Fri, 16 May 97 13:58 BS
% Received: by declan2.cognotec.com.15.9.194.in-addr.arpa with Microsoft Mail id
<[email protected]>; Fri, 16 May 1997
13:58:22 +-10
% Message-ID: <[email protected]>
% From: "Declan O'Connell" <[email protected]>
% To: "'[email protected] - UK Software Partner Engineering 830-4121 
16-May-1997 1013 +0100'" <[email protected]>
% Subject: RE: POINT  28463, Company  Autodealing, LAT QIO
% Date: Fri, 16 May 1997 13:58:21 +-100
% MIME-Version: 1.0
% Content-Type: text/plain; charset="us-ascii"
% Content-Transfer-Encoding: 7bit
3628.3KZIN::HUDSONThat&#039;s what I thinkMon May 19 1997 07:4132
From:	DEC:.REO.JOLLY::HUDSON       "[email protected] - UK Software
Partner Engineering 830-4121" 19-MAY-1997 11:40:16.83
To:	VBORMC::"[email protected]"
CC:	HUDSON
Subj:	RE: POINT  28463, Company  Autodealing, LAT QIO

Hello Declan

I don't know what that error message means, but I think it may result from your 
entity type (P3) being wrongly specified in the QIO:

               P3   := %IMMED ( LAT$C_ENT_PORT + LAT$C_ENTS_UNK )


You are ORing the LAT$C values together; confusingly enough you actually need
to put LAT$C_ENTS_UNK in bits 16-19 of this longword (see sec 5.4.4.3 "Creating
and Configuring LAT Entities" of the I/O User's Ref Manual).  I don't know why
they've done it like this - maybe just to catch people out. 

Anyway, the example 5-1 in the manual (in C) does this using the syntax:

	LAT$C_ENT_PORT | (LAT$C_ENTS_OLD << 0x10)

In Pascal you need something like

               P3   := %IMMED ( LAT$C_ENT_PORT + (LAT$C_ENTS_UNK * 65536))

Have a go with this and see if it gets you any further...

regards
nick