Re: Assembler program attaching a C program

2022-11-21 Thread David Crayford
If you want to pass the address of a parameter list in R1 use the 
following.


#pragma runopts(plist(os))

And in main

struct plist * parms = ( struct plist * ) __R1;



On 21/11/22 17:22, Fabio Massimo Ottaviani wrote:

Hello

I wrote an assembler program attaching a C program with ATTACHX

ATTCHATTACHX EP=PROGC,PARAM=R10,
ECB=AMYECB,
DISP=NO

I set the address of the field, I want to pass as parameter, in R10
I checked that argv in the C program is empty

Is there something I have to do in the C program to get the content of the 
field?

Thanks
Fabio

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: End of several eras

2022-11-21 Thread g...@gabegold.com
And it will never be known what OCO cost IBM, customers, and the industry in 
terms of customer contributions/fixes/innovations it prevented. In VM-land, 
where source was once complete, its progression was like a light on a dimmer 
switch slowly fading out. But that's an old, settled, war. Maybe someone will 
earn a PhD documenting it.

On Mon, 21 Nov 2022 17:25:00 -0800, Michael Stein  wrote:

>On Mon, Nov 21, 2022 at 06:06:43PM -0600, g...@gabegold.com wrote:
>> Fiche was fun.
>
>yes, definitely.
>
>I remember using fiche two versions back (save that old fiche) to help
>make a fix in VTIOC (TSO/VTAM) hung users which couldn't be canceled.
>
>And telling OPEN/CLOSE/EOV the line number containing the change they
>had made which broke my program (they said it explained a lot of other
>things they had seen).
>
>Also a small one bit change to 3830 microcode to prevent channel
>disconnect (the 3830 was connected to a 360/91 selector channel).
>Along with this was a 360 program run at IPL time which sent the 3830
>a microcode program to zap the bit.
>
>I always wonder how gradual OCO really was since there was a lot
>of old fiche around.  But, I'd guess, gradually the fixes from the
>field slowed down to a trickle.
>
>--
>For IBM-MAIN subscribe / signoff / archive access instructions,
>send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Assembler program attaching a C program

2022-11-21 Thread Amr@Systemz
 Char **argv expects an array of char pointers, are you trying to pass that ? 
Why did you choose R10 for passing parameters ? Is your program using xlc or 
metal ?

try sending it in R1.
 On Monday, November 21, 2022, 01:32:41 AM PST, Fabio Massimo Ottaviani 
 wrote:  
 
 Hello 

I wrote an assembler program attaching a C program with ATTACHX 

ATTCH    ATTACHX EP=PROGC,PARAM=R10,  
              ECB=AMYECB,              
              DISP=NO

I set the address of the field, I want to pass as parameter, in R10
I checked that argv in the C program is empty

Is there something I have to do in the C program to get the content of the 
field?

Thanks
Fabio

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
  

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: End of several eras

2022-11-21 Thread Michael Stein
On Mon, Nov 21, 2022 at 06:06:43PM -0600, g...@gabegold.com wrote:
> Fiche was fun. 

yes, definitely.

I remember using fiche two versions back (save that old fiche) to help
make a fix in VTIOC (TSO/VTAM) hung users which couldn't be canceled.

And telling OPEN/CLOSE/EOV the line number containing the change they
had made which broke my program (they said it explained a lot of other
things they had seen).

Also a small one bit change to 3830 microcode to prevent channel
disconnect (the 3830 was connected to a 360/91 selector channel).
Along with this was a 360 program run at IPL time which sent the 3830
a microcode program to zap the bit.

I always wonder how gradual OCO really was since there was a lot
of old fiche around.  But, I'd guess, gradually the fixes from the
field slowed down to a trickle.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: End of several eras

2022-11-21 Thread g...@gabegold.com
Fiche was fun. Up to 370/148, microcode fiche was provided, including microcode 
problems.

Browsing, I found one problem described as, "When LM instruction specifies same 
register twice -- that is, to load one register -- all 16 registers are 
loaded". Oops.

And once, working on an interesting but stupid project that involved validating 
opcodes behaving properly (because management heard loony advice from an 
alleged industry expert that 4341 wouldn't be fully compatible architecture) 
several opcodes that shouldn't have existed did, didn't 0C1. Microcode fiche 
revealed that they were assist instructions for VS/1, etc.

On Mon, 31 Oct 2022 23:46:40 -0500, Brian Westerman 
 wrote:

>I agree, I can't possibly convey how much I learned from some old IBM fiche 
>that I had access to in the computer center when I just started college.  The 
>first really important thing I wrote (I was 17) were mods to pass the 
>condition codes from step to step within JES2 and then send the highest one to 
>the console and syslog at job end.  I later learned that others had done the 
>same thing, and long before me, but I learned a lot.  That code didn't work 
>with the first version of MVS I was exposed to after college, so it was 
>followed by doing that same thing with two jes exits and then even later 
>writing our companies Automation software that pulls the condition codes from 
>the same fields they were placed in originally way back then.  
>
>Everything I have written over the years is still based on concepts and 
>techniques that I first learned by looking at the code in the IBM fiche.
>
>I had an extra advantage in that I worked for IBM throughout that same time 
>and was able to see some truly spectacular coding techniques and I am truly 
>thankful for that opportunity. 
>
>I realize that IBM wanted to keep nefarious people from copying the code, but 
>I think that we lost a great deal of experience and expertise when we lost 
>access to the code.  Some of those techniques are just not around for people 
>to examine and learn from, and that's very sad.
>
>Brian
>
>
>
>On Mon, 31 Oct 2022 19:42:50 -0400, David Spiegel  
>wrote:
>
>>Hi Tom,
>>1983, eh?
>>The same year as the (expletive deleted) OCO policy.
>>I've seen IBM-lifers defend it on this forum, yet, it still did not/does
>>not make sense.
>>
>>Regards,
>>David
>>
>
>--
>For IBM-MAIN subscribe / signoff / archive access instructions,
>send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Hillgang reminder

2022-11-21 Thread Neale Ferguson
The next meeting of Hillgang, the DC, Virginia, Maryland (DMV), z/VM and Linux 
user group is meeting in Herndon Virginia on the 6th of December. Agenda, 
location, and registration details are available at 
https://www.vm.ibm.com/events/hill1222.pdf. Registration is free and is used to 
determine catering requirements for our free breakfast that's provided by 
Velocity Software.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: GTTERM assistance (really 3270 VTAM application?)

2022-11-21 Thread Brian Chapman
Michael.

Originally, I started on this project to build a PC service provider
address space. The address space acquired several 64-bit areas with the
IARV64 GETSHARED service, and the service provider would allow problem
state address spaces to acquire interest into these 64-bit areas. The
64-bit areas were buffers for monitoring data. I also wanted a 3270
interface for administrative management of the configurations and the
monitoring data. Now, this project has morphed into something different.

For the register equates, I only use the equates when the equate is related
to an active USING statement. With registers 0,1,12 (if not
baseless),13,14,and 15 unavailable, it really limits the number of
registers for addressing control blocks. I find the register equate
methodology very useful and descriptive when managing many DSECTs.

I found the solution to my bind problem. All of the examples and most of
the manuals referenced the alternate area for bind information. I found one
manual that referenced 'Record area' and 'RECLEN'. I change the VTAM
INQUIRE macro from AAREA and AAREALN to AREA and AREALEN, and the INQUIRE
and OPNDST worked successfully with the bind information returned.

Here is the updated source:
**-**
** PROGRAM : PORTDSPI  **
** AUTHOR  : BRIAN CHAPMAN **
** WRITTEN ON  : 23 AUGUST 2017**
** MODIFIED ON :   **
** ASM OPTIONS : RENT,REUS AMODE=31 RMODE=31 AC=0  **
** DESCRIPTION : TASK INITIALIZATION ROUTINE   **
** : THIS PROGRAM BUILDS THE INITIAL TASK RELATED  **
** : CONTROL BLOCKS FOR A NEW TASK TO BE DISPATCHED.   **
**-**
** *
* REGEQU   *
** *
* COPY  PORTKERN   *
* COPY  PORTDMH*
* COPY  TASKANCH   *
* COPY  SESSVTAM   *
* COPY  SESSSOKT   *
** *
* EJECT*
* IFGRPL AM=VTAM*
* EJECT*
* ISTUSFBC   *
* EJECT  *
* IFGACB AM=VTAM *
* EJECT  *
* IFGEXLST AM=VTAM*
* EJECT  *
* ISTDNIB *
* ISTDBIND   *
**   *
*WORKAREA DSECT  *
*WORKNAME DSCL8  *
*SAVEAREA DS18F  *
*SAVERC   DSF*
*SAVEANCH DSF*
**   *
*VTAMRETC DSF*
*VTAMFDB2 DSF*
**   *
*CALLPLST DS0F   *
*CALLPRM1 DSF*
*CALLPRM2 DSF*
*CALLPRM3 DSF*
*CALLPRM4 DSF*
*CALLPRM5 DSF *
**   *
*WORKLEN  EQU   *-WORKAREA   *
**   *
*WORKREG  EQU   R3   *
*KERNREG  EQU   R4   *
*ANCHREG  EQU   R5   *
*DMHREG   EQU   R6   *
*VTAMREG  EQU   R6   *
*RPLREG   EQU   R7*
*NIBREG   EQU   R8   *
*ACBREG   EQU   R9   *
*BINDREG  EQU   R10  *
**   *
*PORTDSPI CSECT  *
*PORTDSPI AMODE 31   *
*PORTDSPI RMODE ANY  *
* STM   R14,R12,12(R13) SAVE REGISTERS   *
* LRR12,R15 ESTABLISH BASE   *
* USING PORTDSPI,R12SET ADDRESSIBILITY*
* B START*
**   *
* DCCL9'PORTDSPI' *
* DCCL9'&SYSDATC' *
* DCCL5'&SYSTIME' *
***
*STARTDS0H 

Re: Assembler program attaching a C program

2022-11-21 Thread Seymour J Metz
If the C program is designed to be called from JCL then it will expect R1 -> 
PLIST -> (LEN,CHARS), where LEN is a halfword containing the length of CHARS. 
The compiled prolog will convert that to a C parameter list. Whic C compiler 
are you using, with what options?


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
Fabio Massimo Ottaviani [fabio.ottavi...@epvtech.com]
Sent: Monday, November 21, 2022 4:22 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Assembler program attaching a C program

Hello

I wrote an assembler program attaching a C program with ATTACHX

ATTCHATTACHX EP=PROGC,PARAM=R10,
   ECB=AMYECB,
   DISP=NO

I set the address of the field, I want to pass as parameter, in R10
I checked that argv in the C program is empty

Is there something I have to do in the C program to get the content of the 
field?

Thanks
Fabio

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Q: DB2 Online Classes

2022-11-21 Thread Steve Thompson

Thank you Binyamin.

To your question about Admin stuff, that is what I had been doing 
for a client a few years ago. But now, I see a need for me to do 
DB2 applications stuff. But let me be clear on the Admin stuff -- 
I am not a DB2 DBA. I'm just a guy who can build tools that can 
generate JCL/JOB(s) to do COBOL compiles, invoking any|ALL 
translators needed for that compile, get it into the LNKEDT and 
have it collect all the needed objects for a load module, etc.


What I need to do now is learn how DB2 does SQL, or better, SQL 
specific to/for DB2.


Regards,
Steve Thompson


On 11/21/22 04:59, Binyamin Dissen wrote:

On Sun, 20 Nov 2022 18:17:42 -0500 Steve Thompson  wrote:

:>Anyone know of an online, at your own pace, DC2 programming class?

:>I have a need to learn DB2 SQL type programming. I used to do
:>this with Fujitsu COBOL on NT 4.0 years ago, but now I need to
:>know the specifics of the DB2 world. I know that they have to do
:>a BIND (I wrote an ISPF system that generated all the JCL to get
:>the source, expand it prior to the translators then fed it to the
:>COBOL compiler, link-edit and generated the BIND...). But I've
:>not done DB2 specific programming.

:>I currently don't have access to a system that I can use for
:>this, so I need a class that has lab(s) to do.

I would break this up into two parts, SQL and DB2 Admin Work. There are many
versions of SQL which are very close to DB2 on many platforms. That would be
the best way to start. The create table and view is also pretty similar.

Afterwards, the Admin stuff like Binds, Grants, packages and plans,  I don't
know if application programmers do these , in general.

--
Binyamin Dissen 
http://www.dissensoftware.com

Director, Dissen Software, Bar & Grill - Israel

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: AW: SPF/SE is available for free

2022-11-21 Thread Rony G. Flatscher

On 20.11.2022 22:35, Bob Bridges wrote:

I haven't been keeping up with this thread, but I drop in on the random 
long-running thread just because, and I see this.  For ooREXX and VBS and the 
like I've been trying out Notepad++, but I'm not entirely happy with it.


You could use IntelliJ [1] (they have a free community edition) which is available for any operating 
system platform that runs Java. There is an IntelliJ ooRexx-Plugin [2] that supports ooRexx up to 
the latest version 5.0 and the experimental executor edition of ooRexx. The plugin will syntax check 
your Rexx code (you'll get redlines at the right border to navigate to the sections that contain 
errors, together with an explanation of the error) and also supports the few additional mainframe 
Rexx characters (an option you need to activate as these characters did not get into TRL2).



There are a few functions (like the missing  that I don't care for, and 
it's pretty troublesome to find or set the colors the way I'd like them.  I'm open to 
recommendations.  Never heard of Hessling.  I'd probably use the PC version of ISPF 
Editor, but I hear it's not around any more.

THE ("the Hessling editor") can be found here: 


The author, a very nice Australian gentleman named Mark Hessling is also the maintainer of the 
open-source Regina Rexx interpreter of which there was an experimental port to Hercules.


Mark is an astounding man having witnessed his initiatives, tools, products and skills for decades 
(just look at the depth of his knowledge over all the Regina and Rexx external function packages 
support for different operating systems). E.g. he created the Rexx/SQL function package at a time 
(literally decades ago) where the big guys like IBM or Oracle did not support interaction with each 
other's RDBMS, but you could (and can) use Rexx/SQL to do that and connect to different RDBMS at the 
same time. Or look at his long standing Rexx/CURL external function package and the like!


If you look around the above web page you might find additional interesting and valuable Rexx 
related information. Also, you would be able to meet with him in person via the RexxLA mailing lists 
by enrolling to RexxLA for free at  (to fight 
robots there is a funny little challenge which mandates knowledge of Rexx). Also you would be able 
to communicate via the RexxLA mailing lists with the father of Rexx, Mike F. Cowlishaw, or "Mr. 
ooRexx", Rick McGuire, and many more Rexx afficionados... :)


---rony

[1] IntelliJ (quite popular development environment): 

[2] IntelliJ ooRexx-plugin: 





/* When a man is getting better he understands more and more clearly the evil 
that is still left in him.  When a man is getting worse, he understands his own 
badness less and less.  A moderately bad man knows he is not very good; a 
thoroughly bad man thinks he is all right.  This is common sense, really.  You 
understand sleep when you are awake, not while you are sleeping.  You can see 
mistakes in arithmetic when your mind is working properly; while you are making 
them you cannot see them.  You can understand the nature of drunkenness when 
you are sober, not when you are drunk.  Good people know about both good and 
evil; bad people do not know about either.  -C S Lewis, _Christian Behavior_ */


-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of W 
Mainframe
Sent: Sunday, November 20, 2022 06:40

The SPF/SE is an excellent editor, indeed...I use another eccellent editor, 
always free, The Hessling Editor, a Xedit clone with full macro support using 
Rexx.
Dan



--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Q: DB2 Online Classes

2022-11-21 Thread Binyamin Dissen
On Sun, 20 Nov 2022 18:17:42 -0500 Steve Thompson  wrote:

:>Anyone know of an online, at your own pace, DC2 programming class?

:>I have a need to learn DB2 SQL type programming. I used to do 
:>this with Fujitsu COBOL on NT 4.0 years ago, but now I need to 
:>know the specifics of the DB2 world. I know that they have to do 
:>a BIND (I wrote an ISPF system that generated all the JCL to get 
:>the source, expand it prior to the translators then fed it to the 
:>COBOL compiler, link-edit and generated the BIND...). But I've 
:>not done DB2 specific programming.

:>I currently don't have access to a system that I can use for 
:>this, so I need a class that has lab(s) to do.

I would break this up into two parts, SQL and DB2 Admin Work. There are many
versions of SQL which are very close to DB2 on many platforms. That would be
the best way to start. The create table and view is also pretty similar.

Afterwards, the Admin stuff like Binds, Grants, packages and plans,  I don't
know if application programmers do these , in general.

--
Binyamin Dissen 
http://www.dissensoftware.com

Director, Dissen Software, Bar & Grill - Israel

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Assembler program attaching a C program

2022-11-21 Thread Binyamin Dissen
On Mon, 21 Nov 2022 10:22:01 +0100 Fabio Massimo Ottaviani
 wrote:

:>I wrote an assembler program attaching a C program with ATTACHX 

:>ATTCHATTACHX EP=PROGC,PARAM=R10,   
:>   ECB=AMYECB,   
:>   DISP=NO

:>I set the address of the field, I want to pass as parameter, in R10
:>I checked that argv in the C program is empty

:>Is there something I have to do in the C program to get the content of the 
field?

To pass the address of the item pointed to by R10, you must specify (R10)

Then the question is how the C main program expects the parameters. If it
expects an OS plist, R10 must point to a halfword length followed by
data/text.

--
Binyamin Dissen 
http://www.dissensoftware.com

Director, Dissen Software, Bar & Grill - Israel

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Assembler program attaching a C program

2022-11-21 Thread Fabio Massimo Ottaviani
Hello 

I wrote an assembler program attaching a C program with ATTACHX 

ATTCHATTACHX EP=PROGC,PARAM=R10,   
   ECB=AMYECB,   
   DISP=NO

I set the address of the field, I want to pass as parameter, in R10
I checked that argv in the C program is empty

Is there something I have to do in the C program to get the content of the 
field?

Thanks
Fabio

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN