HP3000-L Archives

August 2006, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Ron Horner <[log in to unmask]>
Reply To:
Date:
Thu, 17 Aug 2006 21:22:25 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (180 lines)
Let's clear the air here.

First of all I never said that the example would not work.  I called in to
question the offering of an example without testing it first.

Second point, I never said that ???INTR files contain routines.  They act as
a reference for the system, and programmers, to use system intrinsics.

Final and very important point, I don't know Walter Murray as maybe you do.
If I offended Walter or anyone in my comments, I'm sorry.  At the same time,
my comments are based on my experience.  You see I haven't just come from
some 6 week programming class either.  My experience tells me that working
around the system can be a dangerous practice.  I felt that was what was
being suggested.

For the record, I read Walter's email several times before replying.  In
writing my email, I made it a point not put words in anyone's mouth.  It's
too bad that I was not given the same courtesy.

Ron Horner

-----Original Message-----
From: HP-3000 Systems Discussion [mailto:[log in to unmask]]On
Behalf Of Steve Cooper
Sent: Thursday, August 17, 2006 5:54 PM
To: [log in to unmask]
Subject: Re: AIFCHANGELOGON


I was going to stay out of this thread, but with an outrageous post
like Ron's, I couldn't.  Ron: Open mouth, insert foot.

First of all, there are few people on the planet who know HP's COBOL
better than Walter Murray, so I suggest you read his posts very
carefully.  In fact, his post already corrects all of the information
you have that's wrong.

The ???INTR files you refer to do NOT contain routines at all.  They
merely contain the Header information for the routines.  In other words,
they tell compilers how many parameters procedures have, what type each
parameter is, whether the name needs to be up- or down-shifted, etc.
What Walter has shown, is that COBOL is not at all limiting, but is in
fact, quite flexible.  You can tell the compiler all of that information
yourself with all of those backslashes, and if you do, there is nothing
else in the ???INTR files the compiler would need to know.  You just have
to be sure you give the information correctly to the compiler.

It's the linker or loader's job to actually find the routine at link or
run time.  Since the routine in question is in a standard library that is
already being searched, there will be no problem there.

I see no reason why Walter's example won't work.  Before one criticizes
someone else's example as not working, perhaps one should test it and
see, or else "remove hands from the keyboard".

Steve

> -----Original Message-----
> From: HP-3000 Systems Discussion
> [mailto:[log in to unmask]] On Behalf Of Ron Horner
> Sent: Thursday, August 17, 2006 3:21 PM
> To: [log in to unmask]
> Subject: Re: [HP3000-L] AIFCHANGELOGON
>
> First of all if you are going to offer an example, and not
> even test it.  I
> advise backing away from the HP3000.  Just remove hands from
> keyboard on
> that one.
>
> OK OK OK.  Let me understand this.  AIFCHANGELOGON is a
> system intrinsic
> running under the AIF subsystem.  You are saying that you
> don't need AIFINTR
> to call it.  I agree that you could use COBOL but it is very limiting.
>
> I'm sorry to say that you MUST have the AIFINTR file to call
> these system
> intrinsics.  How is the system going to know that you want to
> call a system
> intrinsic.  It's the ???INTR file.
>
> The reason that I said that COBOL is very limiting is that
> you have to have
> the ???INTR file at the time you compile the program. In fact
> the COBOL
> compiler defaults to using SYSINTR.  Pascal and C allow you
> to control the
> ???INTR files that you use when you declare the intrinsic.
> So you can call
> AIFCHANGELOGON and then call HPCICOMMAND to perform the
> SHOWME command to
> check if the truly changed it's logon (HPCICOMMAND sits in the SYSINTR
> file).
>
> Sorry to be the bad guy, oh well...
>
> Ron Horner
>
>
> -----Original Message-----
> From: HP-3000 Systems Discussion [mailto:[log in to unmask]]On
> Behalf Of Walter J. Murray
> Sent: Wednesday, August 16, 2006 11:21 PM
> To: [log in to unmask]
> Subject: Re: AIFCHANGELOGON
>
>
> Michael Anderson wrote:
>
> [snip]
> > but I guess I am going to have
> > find an HP3000  with C/iX and AIFINTR on it to write a
> subroutine that
> > would call AIF on behalf of the COBOL program.
>
> Don't give up on COBOL.  You shouldn't need C/iX or Pascal/iX or even
> AIFINTR.  Here's some code to get you started.  I'm not going to test
> it, but I expect it will work, if you get all the data items set up
> correctly in Working-Storage.  (The PICTURE clauses in this program
> should work OK.)  I can tell you that this program generates the same
> code as if you declare AIFCHANGELOGON as an intrinsic and compile on a
> system that does have AIFINTR.
>
> -----cut here-----
> IDENTIFICATION DIVISION.
>  PROGRAM-ID. AIF-TEST.
> *AUTHOR.  WALTER J. MURRAY.
>  DATA DIVISION.
>  WORKING-STORAGE SECTION.
>  01  OVERALL-STATUS    PIC X(4).
>  01  LOGON-CMD         PIC X(128).
>  01  LOGON-DESC        PIC X(112).
>  01  OPTIONS           PIC S9(9)    COMP.
>  01  ERROR-STATUS      PIC X(4).
>  01  USER-ID           PIC S9(9)    COMP.
>  PROCEDURE DIVISION.
>  MAIN.
>      CALL "\AIFCHANGELOGON" USING
>              \6\
>              OVERALL-STATUS
>              LOGON-CMD
>              LOGON-DESC
>              \OPTIONS\
>              ERROR-STATUS
>              \USER-ID\
>      STOP RUN.
>  END PROGRAM AIF-TEST.
> -----cut here-----
>
> Notes.
> 1.  The '\' preceding the name of the intrinsic in the CALL statement
> prevents the compiler from downshifting the name.
> 2.  The slashes surrounding OPTIONS and USER-ID force those
> operands to
> be passed by value instead of by reference.
> 3.  The \6\ causes the integer 6 to be passed by value as the first
> parameter, specifying the number of parameters actually
> passed.  This is
> part of the OPTION EXTENSIBLE mechanism of Pascal/iX.
>
> Calling intrinsics from COBOL can be an enjoyable pastime.  You just
> have to know what the intrinsic is expecting, and then figure
> out how to
> persuade the COBOL compiler to produce it.  Some of the intrinsics are
> more challenging than this one.
>
> Enjoy!
>
> Walter
>
> Walter J. Murray
>

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2