Subject: | |
From: | |
Reply To: | |
Date: | Thu, 17 Aug 2006 17:21:19 -0500 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
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 *
|
|
|