Operating System - OpenVMS
1751907 Members
5228 Online
108783 Solutions
New Discussion

Re: ICC_OPEN_ASSOC using Pascal

 
SOLVED
Go to solution
Brian Reiter
Valued Contributor

Re: ICC_OPEN_ASSOC using Pascal

Hi John

 

Thanks for the hints, making all the parameters UNSIGNED and passing by reference does the trick. IADDRESS can then be used to examine the values. I will worry about the string parameters at some other time. Not sure I need to worry about them at the moment, although something like C_STR_T mechanism may be the route to go. 

 

 

cheers

 

Brian

Jeremy Begg
Trusted Contributor

Re: ICC_OPEN_ASSOC using Pascal

Hi Brian,

 

I realise you've found a solution but FYI here is how I did it in my own code (part of the SOPHAST product we sell).

 

[Asynchronous,Check(NONE)]
Function Connection_AST (event_type    : [immediate,long] unsigned;
                         conn_handle   : [immediate,long] unsigned;
                         data_len      : [immediate,long] unsigned;
                         var data_buff : [unsafe] SOPHAST_R_Command;
                         reply_buflen  : [immediate,long] unsigned;
                         client_pid    : [immediate] ICC_PID;
                         var username  : [readonly] ICC_Username_Buffer
                        ) : integer;

I've found ICC to be interesting & powerful but also very frustrating until you get the hang of it.

 

Regards,

Jeremy Begg

Brian Reiter
Valued Contributor

Re: ICC_OPEN_ASSOC using Pascal

Hi Jeremy,

 

Its always good to have a number of solutions. I've found the ICC to be a very usefl tool.

 

 

cheers

 

Brian

John Gillings
Honored Contributor

Re: ICC_OPEN_ASSOC using Pascal

"[immediate]" excellent!

(I really miss the Pascal compiler)
A crucible of informative mistakes
Richard J Maher
Trusted Contributor

Re: ICC_OPEN_ASSOC using Pascal

See attached COBOL example if anyone has such a requirement in the future.

Brian Reiter
Valued Contributor

Re: ICC_OPEN_ASSOC using Pascal

I often threaten to use COBOL, just to wind the management up. Its bad enough trying to find programmers willing to learn Pascal, they would all prefer to the  Visual methods, we can get any number of VB/C/C++/C# programmers but you get insurrection if they're asked to work on VMS or Unix.

 

Still, the more examples of this kind of stuff the better.

Limage
New Member

Re: ICC_OPEN_ASSOC using Pascal

Hello,

Does anyone have a program example in fortran using icc$ modules ?

I always receive a return status of 0 instead of 1.

I suppose that something's wrong in my code.

Hoff
Honored Contributor

Re: ICC_OPEN_ASSOC using Pascal

The general behavior implies you're not synchronizing correctly somewhere; seeing a zero usually means the operation hasn't been called for some reason, or that the AST hasn't completed.  (But without seeing where you're getting that zero from, a specific answer isn't feasible.)

 

Please post your (apparently buggy?) Fortran code; a reproducer.   (By posting your existing Fortran code, folks can start by reviewing existing (and non-functional) Fortran code for potential errors and issues.  And we've all written our share of source code bugs over the years, too.)

 

And FWIW, there's a Pascal example call already posted in this thread, if you haven't seen that.

 

(I'd start your own thread with this, as this doesn't seem to be the exactly same as the ICC Pascal question you're starting with; you're not able to manage ths thread, and you're also effectively burying your Fortran question.)