John:
Thats what i do in C calling assembler use the prolog and epilog for Assembler
, I was helped by several nice folks on here..and found a good example in the
cbttapes.org Xephon pubs...So i will pay if forward as they say
PWVERFY CSECT
PWVERFY AMODE 31
PWVERFY RMODE ANY
YREGS
EDCPRLG BASEREG=R12,DSALEN=WORKLEN
USING LGINWORK,R13
LR R2,R1 SAVE INCOMING PARM ADDRESS
STORAGE OBTAIN,LENGTH=TEMPLEN,LOC=ANY
.......your code here
ENDPWVF DS 0H
XR R5,R5
L R5,RETCODE
STORAGE RELEASE,LENGTH=TEMPLEN,ADDR=(R10)
LR R15,R15
EDCEPIL
LGINWORK EDCDSAD
WORKLEN EQU *-LGINWORK
#include <stdio.h>
#include <string.h>
#pragma linkage(PWVERFY,OS)
int rc;
unsigned int SAFrc;
unsigned int RACFrc;
unsigned int RACFrsn;
char ruserid[8];
char currpwd[8];
char new_pwd[8];
main()
{ rc = PWVERFY(&ruserid,&currpwd,&SAFrc,&RACFrc,&RACFrsn);
if (RACFrc == 0)
{ printf("Password verify worked\n"); }
else
{ printf("Password verify failed\n");
printf("Password Not Valid for this RACF Userid\n");
}
The above example isnt a full example, just snippets of the actual code.
Showing the call and what is needed in this example.
This example is making a call to an Assembler routine that does a RACROUTE
call.
Regards,
Scott J Ford
Software Engineer
http://www.identityforge.com/
________________________________
From: John McKown <[email protected]>
To: [email protected]
Sent: Wednesday, May 1, 2013 4:59 PM
Subject: Re: Mixing C and assembler - under OpenMVS
good point. I am getting to be a bit of an LE bigot because I like to use C
(IBM C) subroutines in my HLASM. I don't have a C license, but I am allowed
to use the C subroutines along with the other LE subroutines from PL/I and
FORTRAN. I prefer to be "lazy" and use IBM's (et al.) subroutine library in
preference to an RYO. At least whenever it is "reasonable" (to me).
Definitely need to LE enable my HLASM in that case. Wish I could afford a
C/C++ compiler.
On Wed, May 1, 2013 at 3:22 PM, Thomas David Rivers <[email protected]>wrote:
> John McKown wrote:
>
>
>> I would _strongly_ suggest that you take the time and effort to LE enable
>> your assembler subroutines if you're going to use them with an LE main
>> routine such as C or COBOL.
>>
> That's assuming you're using IBM (LE) C. You can do OpenMVS
> programming with the Dignus C runtime and not use LE.
> Using this approach, assembler routines are not LE-enabled.
>
> - Dave Rivers -
>
> --
> [email protected] Work: (919) 676-0847
> Get your mainframe programming tools at http://www.dignus.com
>
> ------------------------------**------------------------------**----------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: INFO IBM-MAIN
>
--
This is a test of the Emergency Broadcast System. If this had been an
actual emergency, do you really think we'd stick around to tell you?
Maranatha! <><
John McKown
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN