Re: ./ ADD - which utility? (RANT)

2024-05-20 Thread Andrew Rowley

On 21/05/2024 12:50 am, Radoslaw Skorupka wrote:


The only thing I still cannot do is to convince my students the 
z/OS<->PC data exchange is easy and well tooled.


It will never be easy due to complications from EBCDIC and record 
structure. Even IBM frequently gets it wrong.


There are new tools, e.g. I have been experimenting with Zowe CLI. It's 
worth trying for file transfer and can create new datasets, PDS etc. It 
only requires z/OSMF on the mainframe, i.e. nothing to install there - 
only configuration.


--

Andrew Rowley
Black Hill Software

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


Re: Mainframe performance tool replacement

2024-05-07 Thread Andrew Rowley

On 8/05/2024 7:40 am, Wayne Bickerdike wrote:

EasySMF. Andrew Rowley may chip in here.


Thanks, yes EasySMF is another option.

There is a Windows based component with canned reports, and Java SMF API 
for customized reports that can run on z/OS.


I'm happy to work with you to reproduce some of your current reports 
with a free trial of the Java API, if that interests you.


More detail is available here:

https://www.blackhillsoftware.com/

Andrew Rowley

--
Andrew Rowley
Black Hill Software

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


Re: Anyone exploiting ZEDC?

2024-04-29 Thread Andrew Rowley

On 19/04/2024 9:35 pm, Scott Chapman wrote:

Agreed, it's been many years since I ran similar test with our software and 
don't remember the exact details, but my recollection is that I saw no 
noticeable change in CPU consumption. Which I remember being particularly 
interested in because I'd heard of issues reading that compressed data.
I did some experiments with SMF data with and without zEDC. What I saw 
in my test:
- zEDC I/O was much faster, reducing elapsed time by more than 10x in 
some cases

- CPU time for compression seemed to be less than 0.2s per GB
- CICS software compression greatly reduced the CPU time for copying the 
zEDC compressed data e.g. if you have weekly/monthly SMF housekeeping


Also some interesting results processing zEDC compressed data with Java. 
zEDC actually reduced the amount of time on the general purpose CPs - it 
seems like more of the work ended up on the zIIPs. Reporting on 39GB of 
zEDC compressed CICS data used only 2s CP / 38.6s zIIP time, compared to 
5.6s CP time reading the data with IFASMFDP. Reading the 6.6 GB dataset 
in Java used 1.49s CP time without zEDC, 1.25s CP time with zEDC (plus 
zIIP time).


You can read the details here:
https://www.blackhillsoftware.com/news/2024/04/29/using-zedc-compression-for-smf-data/

--
Andrew Rowley
Black Hill Software

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


Re: REXX vs other languages WAS: Rexx numeric digits and scientific notation question

2024-04-22 Thread Andrew Rowley

On 23/04/2024 11:55 am, Paul Gilmartin wrote:

On Tue, 23 Apr 2024 10:59:47 +1000, Andrew Rowley  wrote:

...
To me, it is much clearer to be explicit, including the concatenation, e.g.
"DELETE " || foo

That overkill is apt to confuse a POSIX shell partisan who would
see the blank as part of the command name


Isn't Rexx assembling it all into one string, which gets then run as the 
command?


There can be significant spaces between parts of the command, and no 
spaces allowed in other parts. So you could have e.g.


"DELETE ABC" || suffix
or
"DELETE" prefix || suffix
which is very different from
"DELETE" prefix suffix

and it can get much more complex. I would rather use a consistent 
concatenation operator and explicitly insert spaces rather than rely on 
getting the right concatenation operator in the right place.


It's a matter of style, but there are some things that just look like 
potential bugs to me.



--
Andrew Rowley
Black Hill Software

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


Re: REXX vs other languages WAS: Rexx numeric digits and scientific notation question

2024-04-22 Thread Andrew Rowley

On 23/04/2024 12:01 am, Seymour J Metz wrote:

delete foo

rather than

'DELETE' foo

is a simple example. In practise I often need multiple upper case constants in 
a single expression.


In this example, delete *looks like* an instruction rather than a 
variable - the fact that it is a variable is likely to surprise people.


It seems to be setting up for a problem like:

if  then
   delete = 'yes'
...
if delete = yes then
    delete foo

If I understand your example correctly,
delete foo
concatenates the values of the variable delete (which is 'DELETE' if 
hasn't been initialized) and foo, inserting an implied blank between 
them, then passes the result to an environment set up previously with an 
ADDRESS statement?


This is what I want to avoid using SIGNAL ON NOVALUE.

To me, it is much clearer to be explicit, including the concatenation, e.g.
"DELETE " || foo
seems much clearer about exactly what is happening/expected, which are 
variables and which are (expected to be) constant etc.


--
Andrew Rowley
Black Hill Software

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


Re: REXX vs other languages WAS: Rexx numeric digits and scientific notation question

2024-04-21 Thread Andrew Rowley

On 22/04/2024 10:09 am, Seymour J Metz wrote:

It shortens expressions, upper cases automatically and, IMHO, is more readable.


Was that a reply about the usefulness of the default value being the 
variable name, uppercase? If so, I still don't see it.


Can you give an example of how you would use it?

--
Andrew Rowley
Black Hill Software

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


Re: REXX vs other languages WAS: Rexx numeric digits and scientific notation question

2024-04-21 Thread Andrew Rowley

On 22/04/2024 1:19 am, Seymour J Metz wrote:


  2. There is a decades-long argument about NOVALUE. I am in the camp that
 believes the default behavior to be too useful to give up; others believe
 that it is dangerous.


Genuine curiosity: what is the use of the default behaviour? I have 
never been able to see anything particularly useful.


--
Andrew Rowley
Black Hill Software

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


Re: REXX vs other languages WAS: Rexx numeric digits and scientific notation question

2024-04-19 Thread Andrew Rowley

On 20/04/2024 12:41 am, Rony G. Flatscher wrote:

It is an attempt to apply dynamic typing to reduce the need to write 
the explicit type. This service gets carried out by the compiler. In 
true dynamically typed languages you can reuse variables like "start" 
or "tmp" to refer to values of different types.


It's very specifically not an attempt to apply dynamic typing. It's type 
inference, and can only be used when the compiler can determine the 
type. The resulting type is still static. There's no practical 
difference between


var start = ZonedDateTime.now();

and

ZonedDateTime start = ZonedDateTime.now();

except for the amount of code that needs to be written.


A dynamic language when executing code needs nevertheless to check 
whether interaction with the dynamically typed values is correct or not.


This is one of the reasons I prefer static languages. Run time errors 
can go unnoticed until they are discovered on a customer system. Compile 
time errors are almost certain to be discovered in the development 
environment. (Or for in-house programming, compile time errors are 
discovered in development during business hours, runtime errors might be 
discovered in production at 3am...)


Any error that can be found at compile time instead of runtime is a win.


No the Java syntax is all in all much more complex. You note that when 
teaching novices Java and compare that to teaching novices Rexx or 
ooRexx (I have experiences in both).


There might be a distinction between the difficulty of writing a program 
that runs, and writing a program that is correct.



Well in Rexx concatenation rules are quite intuitive, surprisingly 
there is a blank concatenation operator (a blank between concatenated 
strings), an abuttal concatenation operator (no blank between 
concatenated strings) and using the explicit concatenation operator || 
(no blank between concatenated strings). Novices have no problems to 
understand:


   a=1
   say a "- hello!"    -- concatenation with a blank ...: 1 - 
hello!
   say a"- hello!"    -- abuttal, concatenation without a blank: 
1- hello!
   say a || "- hello!"    -- concatenation with || operator ...: 
1- hello!


I had no problem back in the day when I first learnt it, but having 
learnt other languages since I don't think this is intuitive. 
Particularly the added blank between strings (I agree it is surprising). 
There are other variations here, e.g. I'm not sure how abuttal works 
with 2 variables rather than a variable and a literal.



Rexx defines the value of variables that have no explicit value 
assigned to them to be the name of the variable in uppercase, so it 
does not cause a problem. (It does cause problems for programmers who 
got trained to always make sure that a value is assigned to variables. 
This is the reason why ooRexx has an option to activate checking for 
the use of uninitialized variables in Rexx programs to appease those 
who are not accustomed to it or feel that it should not be allowed. ;) ) 


It doesn't cause a problem except when it does. One danger is a typo in 
a variable name. When I wrote some complex Rexx I did use SIGNAL ON 
NOVALUE, but I wasn't totally appeased!


I'm not trying to be negative about Rexx. I still use it when 
appropriate. But I think z/OS people make a mistake ignoring Java. It's 
fast (e.g. 1GB/s for my CICS SMF processing), makes powerful features 
available (e.g. the Twilio example to send SMS messages from z/OS) and 
it's available on pretty much every z/OS system now.



--
Andrew Rowley
Black Hill Software

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


Re: REXX vs other languages WAS: Rexx numeric digits and scientific notation question

2024-04-19 Thread Andrew Rowley

On 20/04/2024 1:42 am, Jay Maynard wrote:

Agreed Java is simply far too complex a language and ecosystem to hold in
the mind. Python is as ubiquitous and much easier to deal with.


Really? What do you NEED to learn for Java that you don't need to learn 
for other languages? public static void main(String[] args)?


Loops, if statements, data types, string processing are things you need 
to learn for all languages. I/O is useful (Rexx EXECIO isn't exactly 
intuitive).


There are lots of add-ons, but you learn them (or just reference the 
details) if you need them. You still need to install add-ons and learn 
extra functionality for Python. Packages providing additional 
functionality are a good thing generally.


The Twilio Python sample looks very similar to the Java version:

https://www.twilio.com/docs/messaging/quickstart/python#send-an-sms-using-twilio

I ran the Java version on z/OS by uploading the Twilio 
jar-with-dependencies and running the sample under BPXBATCH. Is Python 
easier???


//BPXBATCH EXEC PGM=BPXBATCH,REGION=512M
//STDPARM  DD *
sh /usr/lpp/java/J11.0_64/bin/java
 /home/andrewr/java/src/TwilioTest.java
 "Hello from z/OS"
//STDENV   DD *
CLASSPATH=/home/andrewr/java/lib/twilio-10.1.3-jar-with-dependencies.jar
TWILIO_ACCOUNT_SID=xx
TWILIO_AUTH_TOKEN=
//SYSOUT   DD SYSOUT=*
//STDOUT   DD SYSOUT=*
//STDERR   DD SYSOUT=*


--
Andrew Rowley
Black Hill Software

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


Re: REXX vs other languages WAS: Rexx numeric digits and scientific notation question

2024-04-18 Thread Andrew Rowley

On 18/04/2024 8:29 pm, Rony G. Flatscher wrote:
The mileage of people here vary including the Java people themselves 
who have started to reduce the need of explicit declarations like the 
new "var" (imitating JavaScript) instead of strict types or foregoing 
the static main method such that one can at least code the main method 
without the explicit declarations. The motivation about these changes 
is to make Java easier, reduce typing needs and the like.


The Java var keyword is more like C# than Javascript. The variable still 
has a strict type - you can only use var if the compiler can figure out 
the type from other information e.g.


var start = ZonedDateTime.now();

start is a ZonedDateTime. You can't use it before it is defined, you 
can't assign anything other than a ZoneDateTime to it, you can't create 
a new variable called start in the same scope, whether or not it is a 
ZoneDateTime. You can't e.g compare it to a LocalDateTime without 
specifying a timezone for the LocalDateTime - that is one of those 
things that helps avoid errors.


var just reduces redundant code, e.g. specifying the type twice in the 
same statement.



Of course a static and statically typed languages with a compiler must 
define as much rules as possible, such that the compiler can check for 
them all. The more rules the more time consuming and the more 
difficult to learn a language.


I think the syntax rules for Rexx are actually more complex than Java, 
because it is less likely to flag an error if you do something that's 
not actually what you want. E.g. string concatenation where variables 
are expected to be strings but maybe not, might not be initialized, 
sometimes you need vertical bars but not always etc. If you're used to 
the language you write it without thinking and avoid the traps, but the 
rules are there nonetheless.


Java is relatively straightforward, and shares many rules with other 
languages - C++, C# etc. I'm not saying Java is perfect - it has its own 
traps (int vs Integer etc) but I find it a much easier language to work 
with.


--
Andrew Rowley
Black Hill Software

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


Re: Anyone exploiting ZEDC?

2024-04-17 Thread Andrew Rowley

On 18/04/2024 12:04 am, Michael Oujesky wrote:
Just a thought, but anyone processing internally compressed CICS or 
DB2 data on a non-z/OS platform (Windows/Unix) might see substantial 
CPU usage from RLE decompression.


If the compression is lightweight, decompression should be too. I can't 
speak for any other product, but I did an experiment with the EasySMF 
Java API.


Running a CICS report on my laptop I got:

Processing CICS compressed data: 1.2 GB/s (size after decompression)

Processing uncompressed data: 800 MB/s

So processing the compressed data was actually about 50% faster.

--
Andrew Rowley
Black Hill Software

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


Re: REXX vs other languages WAS: Rexx numeric digits and scientific notation question

2024-04-17 Thread Andrew Rowley

On 18/04/2024 4:39 am, Rony G. Flatscher wrote:
As you know already Rexx it would be easy for you to learn about what 
ooRexx adds to Rexx.


...

Notabene: you write one ooRexx program that will be runnable without 
any changes on Windows, Linux and macOS. This means you develop it 
e.g. on Windows at home and execute it in a Linux s390x subsystem at 
work and vice versa. ;)

...
A dynamic and dynamically typed language as ooRexx allows to forgo 
many of the declarations a static and statically typed language 
mandates, thereby simplifying coding quite considerably.



I find Rexx difficult because explicit declarations and static typing 
(as well as tightly controlled scopes) actually make programming easier, 
in general. They show up bugs in the code and make it easier to write 
correct programs. The IDE is also an important factor.


I already write programs on my Windows laptop and run them on z/OS using 
Java :-)


--
Andrew Rowley
Black Hill Software

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


Re: Anyone exploiting ZEDC?

2024-04-17 Thread Andrew Rowley

On 17/04/2024 12:09 pm, Michael Oujesky wrote:

Yes and zEDC poorly compresses internally RLE compressed records.


I was surprised how well zEDC compressed the already compressed records. 
Using my data:


zEDC alone : 52000 tracks

CICS compression + zEDC : 22000 tracks

zEDC seems to be biased towards speed rather than compression ratio, so 
maybe the RLE compression helps by packing more repeated bytes into 
whatever compression window zEDC uses?



Plus CSRCESRV uses GP engine cycles


That's true - CPU is probably more expensive than storage, so this could 
be just an interesting side-track. On the other hand, I think zEDC has 
to decompress and recompress the data for SMF dump etc. so CICS 
compression might save some overhead for SMF housekeeping type 
operations, reducing the amount of data going through zEDC?


--
Andrew Rowley
Black Hill Software

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


Re: REXX vs other languages WAS: Rexx numeric digits and scientific notation question

2024-04-16 Thread Andrew Rowley

On 16/04/2024 3:08 am, Jon Perryman wrote:
From a language standpoint, REXX is just another language but it's 
real strength is it's environment integration. Instead of the caller 
maintaining libraries, the environment automatically integrates with 
REXX. For instance, REXX in the TSO environment, gives you access to 
TSO commands (address TSO) and z/OS programs (address linkmvs). Start 
ISPF and address ISPEXEC is available. ISPF option 2 gives you address 
ISREDIT. SYSCALLS ON gives you address syscalls.


Rexx has better integration with z/OS, but Java has better integration 
with the rest of the world.


I just wrote a piece about sending SMS text messages from z/OS:

https://www.blackhillsoftware.com/news/2024/04/15/text-message-alerts-from-the-z-os-smf-real-time-interface/ 



Spoiler: it's 2 Java statements using the Twilio API.

Twilio.init(ACCOUNT_SID, AUTH_TOKEN); Message message = Message.creator( 
new com.twilio.type.PhoneNumber("+14159352345"), // to new 
com.twilio.type.PhoneNumber("+14158141829"), // from args[0]) .create();


Twilio provide a library that can be used to send text messages from 
z/OS. Amazon provide a library that can be used to work with AWS 
services from z/OS. It's very common for cloud providers to provide Java 
libraries for working with their services. Most of them will work on 
z/OS and open up those features to the mainframe.


Java is also a much more powerful language. I used to write a lot of 
Rexx, but I hate to go back because it is so much easier to get things 
done in Java.


Rexx is good for small tasks where the overhead of starting the JVM is 
significant, or where there isn't functionality in Java. Otherwise, Java 
is my choice.


--
Andrew Rowley
Black Hill Software

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


Re: Anyone exploiting ZEDC?

2024-04-16 Thread Andrew Rowley

On 17/04/2024 7:52 am, Michael Oujesky wrote:


My  current recommendation is to remove internal compression from CICS 
CMF (110/112) and DB2 (100-102) records, Zedc compress the SMF 
logstreams, then compress the logstream offloads via SMS zEDC 
compression.


Have you compared compressed size of zEDC with/without the CICS 
compression? I have limited samples, but it looks like zEDC might 
compress data better if it has been already been compressed by CICS. Of 
course, there is the CPU time to consider.


I think I/O can also be much faster for zEDC compressed data.

--
Andrew Rowley
Black Hill Software

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


Re: Rexx numeric digits and scientific notation question

2024-03-18 Thread Andrew Rowley

On 19/03/2024 12:40 pm, David Crayford wrote:

We utilize both languages, selecting the most suitable for each task at hand. 
Our primary application runs on Java using the Spring Boot framework. We 
orchestrate records originating from various z/OS data sources, transforming 
them into JSON or other pluggable formats, and dispatch them to analytics 
platforms, AI engines, or serve Prometheus metrics. We've developed numerous 
Java record mapping classes generated by our tooling, which is crafted in 
Python using Jinja2 templates and YAML schemas. Opting for Java in this context 
wouldn't be pragmatic.


I've done JSON generation for all the SMF records supported by EasySMF 
in Java, so I guess it can be done either way. It certainly worked for me.



With AI technology already a reality, Python stands as the prevailing 
programming language of the moment. While much buzz surrounds the new Telum 
chip in the z16, the question remains: How do we leverage its potential? For 
this, we require Python libraries—either TensorFlow or PyTorch—running on s390x 
architecture (for now).


My impresson has been that Python is central to AI, but I'm curious 
about more general use cases. What you are using it for doesn't really 
tell me why you are using it. Is it a good choice for e.g. summarizing a 
few hundred million CICS SMF records? I guess AI implies processing 
large quantities of data so maybe it is. On the other hand, processing 
power tends to be less restricted on other platforms...


--
Andrew Rowley
Black Hill Software

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


Re: Rexx numeric digits and scientific notation question

2024-03-18 Thread Andrew Rowley

On 19/03/2024 11:05 am, David Crayford wrote:

If you’re care so much about Java catching errors at compile time then why 
don’t you use Kotlin instead? NPE’s are one of the most common form of Java 
runtime errors that can be eliminated using Kotlins null safety.


Java's not perfect, but it is powerful and it is pretty much universally 
available on z/OS. I'm writing functions for others to build on e.g.:


https://static.blackhillsoftware.com/easysmf-rti/javadoc/com.blackhillsoftware.smf.realtime/com/blackhillsoftware/smf/realtime/package-summary.html

So using/targeting the language that is most available makes sense.

But my question was: Why Python? What are the reasons for using Python 
rather than e.g. Java?


--
Andrew Rowley
Black Hill Software

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


Re: Rexx numeric digits and scientific notation question

2024-03-18 Thread Andrew Rowley

On 19/03/2024 10:01 am, Farley, Peter wrote:

IMHO the learning curve for Java and all the libraries you have to know and 
understand to make it at all useful far outweighs its presumptive establishment 
 in the z/OS ecosystem.


You really don't have to learn a lot of libraries to use Java. Basic I/O 
and Java collections will get you a very long way.


There are a lot of libraries, but they are there because they are 
(hopefully) easier than writing something yourself. You don't need to 
learn them until you actually need that function, and then you can make 
your choice whether to use an existing library or write your own.


--
Andrew Rowley
Black Hill Software

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


Re: Rexx numeric digits and scientific notation question

2024-03-18 Thread Andrew Rowley

On 19/03/2024 9:53 am, Pew, Curtis G wrote:

You get used to the “significant indentation” thing pretty quickly. It really 
makes sense: you should be indenting blocks anyway to make them easy to read, 
so why clutter things up with braces or keywords?

Most scripting languages (including REXX) don’t require declaring variables. 
Since there’s no separate compile step you get the errors when they happen in 
any case, so declaring variables doesn’t buy you much.


I probably would get used to significant indentation, although I do 
indent for readability and I'm not sure I want to be mixing readability 
and logic in the same construct.


Explicitly declaring variables has a number of advantages:

- it flags errors due to e.g. misspellings

- it flags errors when you intend to create a new variable but reuse an 
existing one


- it checks data types, e.g. for SMF data if you have a ZonedDateTime 
you can't assign/compare a LocalDateTime without specifying the time 
zone. So the class designers can protect you form a whole heap of common 
errors, and flag them before the program starts.


--
Andrew Rowley
Black Hill Software

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


Re: Rexx numeric digits and scientific notation question

2024-03-18 Thread Andrew Rowley

On 16/03/2024 11:17 am, David Crayford wrote:

IBM and ISVs are working on Python APIs for products right now. And they will 
be better than the REXX versions.


Why Python? I know it's the latest hot language, but what advantages 
does it have over e.g. Java (well established on z/OS)?


I have looked into it a few times, but get as far as "significant 
indentation" and "no variable declarations" and decide it's not 
something I want to use. Is it a sign of weakness to ask the compiler to 
help me avoid bugs?


--
Andrew Rowley
Black Hill Software

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


Re: SSH tunneling for unattended process.

2024-01-08 Thread Andrew Rowley

On 9/01/2024 6:26 am, Rick Troth wrote:


It's been a minute, but I used SSH to carry PPP traffic back in the day.
The client side PPPD ran 'ssh' as a child process, arranging stdin and 
stdout, as if it was a dial-up modem.


I think this is difficult on z/OS because by default stdin and stdout 
use ASCII<->EBCDIC translation, so anything sending binary data is broken.


I think you can override that, but not conveniently.

--
Andrew Rowley
Black Hill Software

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


Re: ISPF to Panvalet interface

2023-12-21 Thread Andrew Rowley

On 21/12/2023 3:29 pm, Brian Westerman wrote:

compuware was acquired by BMC and they have decided that they want over $20K 
(close to 30) per year for just file-aid.
Is that expensive? It doesn't necessarily seem expensive, compared to 
non mainframe software costs for the size of company that would run a 
mainframe. Especially when you consider limited market size etc.


--
Andrew Rowley
Black Hill Software

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


Re: Test site for certificate revocation?

2023-09-19 Thread Andrew Rowley

On 20/09/2023 8:37 am, Charles Mills wrote:

Does anyone know of a server URL that will present a revoked certificate (for 
my testing purposes)?


Can you create a certificate for your own test site with Lets Encrypt, 
then revoke it?


--
Andrew Rowley
Black Hill Software

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


Re: Switching between SMT-1 and SMT-2

2023-09-18 Thread Andrew Rowley

On 5/09/2023 9:19 pm, Scott Chapman wrote:

It's more complicated than that. Although I would agree that if an LPAR has 
only a single zIIP, likely SMT would be a good idea. But B is not true for 
intervals that people usually consider when looking at utilization levels 
because at the level of dispatch intervals, it's much more likely there's at 
least some intervals where the zIIPs are 100% busy. It really depends on 
arrival patterns and how much you care about very short transactions that may 
be running on the zIIPs.


I had a look at some RMF data, and I think that zIIP velocity (from zIIP 
using and zIIP delay in the SMF 72 records) might be a good indicator. 
It hopefully gives an indication of the real delay much better than the 
overall utilization.


I saw that the velocities on my system were quite low i.e. lots of delay 
even with very low utilization. I suspect (guess) that this is due to 
short running Java jobs where the JVM is running multitple threads 
during JVM initialization. This would probably benefit from SMT2. On the 
other hand if your zIIP work is single threads arriving randomly you may 
not see delay until higher utilization. Does DDF run multiple threads 
for a single unit of work?


I wrote a SMF real time interface sample to read type 72 records and 
issue a message or even a command to change the SMT setting based on 
theSMF 72 zIIP velocity across all service classes. You can see the 
program here:


https://github.com/BlackHillSoftware/easysmf-samples/tree/main/easysmf-rti/rti-smt-switch

My theory is if the zIIP velocity is low, the work would benefit from 
SMT2 because there are lots of threads waiting. If the velocity is high, 
SMT might be hurting due to multiple threads on a processor when there 
is no work waiting. Obviously what is considered "high" and "low" will 
depend on your environment. Martin's question about a WLM reset also 
applies.


--
Andrew Rowley
Black Hill Software

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


Re: Ray Mullins on Assembler demand.

2023-09-07 Thread Andrew Rowley

On 7/09/2023 1:38 am, Seymour J Metz wrote:

With that definition the learning curve is very different.


You don't need to learn all the classes to use Java. It obviously helps 
if you know they are there, but if you know the commonly used classes 
and know how to find information when you hit a "how do I..." question 
you will be fine.


Inheritance and interfaces help immensely, because many classes have 
common interfaces so you only really need to learn them if you need 
their particular specialization.


--
Andrew Rowley
Black Hill Software

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


Re: Switching between SMT-1 and SMT-2

2023-09-06 Thread Andrew Rowley

On 6/09/2023 7:52 pm, Martin Packer wrote:

I really hope you’re not advising customers to run the zIIP pool at 100%. Key 
functions such as Db2 DBM1 Deferred Write and Prefetch, as well as Db2 Log 
Writes, depend on very good access to zIIP.


I'm not advising customers, I'm just saying that workloads like Java in 
particular can and will easily drive zIIP to 100%. I would have expected 
that WLM would be able to manage dispatching priorities to avoid 
impacting DB2. That might require e.g. the Java work running in a 
discretionary service class.


Is that not the case?

--
Andrew Rowley
Black Hill Software

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


Re: Ray Mullins on Assembler demand.

2023-09-05 Thread Andrew Rowley

On 6/09/2023 12:22 pm, Seymour J Metz wrote:

What is "Java"? If it's just the language, it's not that big. But if it's all 
of the classes as well, ...


I think it would have to include the libraries/classes that are included 
in a standard distribution. I'm sure there is a specification for what 
must be included in each Java version.


--
Andrew Rowley
Black Hill Software

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


Re: Is SMP/E needed for installs?

2023-09-05 Thread Andrew Rowley

On 6/09/2023 9:39 am, Steve Thompson wrote:
But, doesn't that take a long time and burn many cycles to get it 
done? I'm only asking to verify what I have been told about z/OSMF in 
the past few weeks.


Good question. SMP/E itself doesn't have a reputation for being 
lightweight, and the z/OSMF install would avoid most of the SMP/E steps. 
Hopefully, a simple restore of a basic SMP/E environment in z/OSMF 
wouldn't be too intensive. Particularly compared to someone muddling 
through trying to understand SMP/E, re-running steps etc.


For a product install, the CPU time etc. is probably not significant 
compared to everyday workload.


--

Andrew Rowley
Black Hill Software

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


Re: Switching between SMT-1 and SMT-2

2023-09-05 Thread Andrew Rowley

On 5/09/2023 10:30 pm, Martin Packer wrote:

And “100% busy” is the wrong criterion – if you want your system to be 
performant.


Isn't that what WLM is for?

25 years ago I did a WLM conversion on a single CPU system. A single CPU 
is probably the most difficult to tune. By necessity, it ran at 100% for 
hours at a time. With appropriate WLM settings it performed fine. You do 
need a mix of work so you have work that can afford to wait, but it's 
not like the system needs time to to rest. There's no major difference 
between idle time and time running lower priority work.


Is the situation worse now?

There were a lot of things we had to do that went against the 
conventional wisdom for WLM at the time - the conventional wisdon did 
NOT work well at 100% or on a single CPU.


--
Andrew Rowley
Black Hill Software

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


Re: Switching between SMT-1 and SMT-2

2023-09-05 Thread Andrew Rowley

On 5/09/2023 10:13 pm, Peter Relson wrote:

I don't think that that is a correct conclusion. It is far more complicated 
than thinking that this is simply about one LPAR.
It depends what your logical vs physical configuration is. It depends what 
resources your other LPARs need. And a lot more.


I understand that this is designed to manage the dispatching between 
multiple LPARs. However, if the result is that experts advise to "only 
use SMT when [adding real zIIPs] was not (or no longer) feasible" and 
"not enable SMT until you have a defined reason to and where it's then 
proven to be beneficial", and customers are commonly seeing workloads 
degraded by enabling SMT, I'm not sure that the objectives are being 
achieved.


Considering the interactions wth other LPARs, is there a significant 
difference between using the same dispatching pattern for SMT-2 as SMT-1 
until all CPUs are busy, versus disabling SMT-2 completely?


SMT should be all gravy. It's supposed to be extra capacity, and ideally 
undetectable until you hit the limits without SMT.



And it is expected that zIIPs are not run "consistently 100% busy". That would 
not be an appropriate usage of zIIPs.


Why not? Is WLM unable to manage dispatching priorities for zIIP? I know 
a lot of zIIP work is short transactions like DDF, but there's also 
Java, which is great for CPU intensive work. Java has functions that 
will check how many CPUs the system has, and parallelize work onto N-1 
threads. It's a bit antisocial on z/OS I know, but that's what WLM is 
for. That would definitely drive zIIPs to 100%, potentially for extended 
periods.


--
Andrew Rowley
Black Hill Software

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


Re: Is SMP/E needed for installs?

2023-09-05 Thread Andrew Rowley

On 6/09/2023 7:34 am, Phil Smith III wrote:

To recap, the goal here is just to make our SMP/E installation as easy as 
possible for the increasing number of customers for whom it seems to be a 
mystery. Yes, that's worrisome; no, I can't fix it. What I can do is try to 
keep them from blowing their fingers off as much as possible by making it as 
easy as possible.


IBM's answer to this would be to recommend installing using a portable 
software instance through z/OSMF. That will deliver the whole SMP/E 
environment pre-built, and the customer doesn't need to do any SMP/E for 
installation. They can still install maintenance using SMP/E, and you 
can be reasonably confident that the SMP/E environment is configured 
correctly so they can install maintenance.


There are some downsides (new stuff to learn etc.) but given your goal 
and the fact that IBM is pushing people to z/OSMF installation anyway, 
it's worth considering.


--
Andrew Rowley
Black Hill Software

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


Re: Switching between SMT-1 and SMT-2

2023-09-04 Thread Andrew Rowley

On 31/08/2023 10:50 pm, Scott Chapman wrote:

But z/OS "densely packs" the cores, meaning that if a work unit is running on a 
zIIP core and another zIIP eligible work unit comes in it will run on the second thread 
on the already busy zIIP core instead of being dispatched to an available but unused zIIP 
core. As I understand it, this was done because PR/SM dispatches cores, not threads, to 
the LPARs and this dense packing makes that easier.


Very interesting, I can see how that would cause problems.

It seems like an attempted optimization that actually causes problems in 
the real world i.e. anyone not already running zIIPs at 100%.


The solution seems simple - IBM could change the dispatching to work 
exactly the same for SMT-1 and SMT-2, until a work unit would have to 
wait. Then instead of waiting it gets dispatched as a second thread. 
Maybe you lose a few % at the top end, but it becomes something the 
customer can turn on and use without analysis.


The current situation sounds like SMT-2 should only be used if you

a) have a single zIIP

or b) are running your zIIPs consistently 100% busy

and for b) you need to turn it off when the workload reduces?

--
Andrew Rowley
Black Hill Software

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


Re: [EXTERNAL] Re: Switching between SMT-1 and SMT-2

2023-08-30 Thread Andrew Rowley

On 30/08/2023 10:22 pm, Horne, Jim wrote:

Peter,

In theory, I agree with you.  In practice, I know of at least one shop with one 
system where overall throughput was worse with SMT=2 than with SMT=1 - and none 
of their systems got the benefits IBM predicted.  I'm not saying it's common 
but it has happened.


Do you know why, or the nature of the workload?

It seems like it should be rare - until there are more processes than 
processors, everything should run at 100%. If you have more processes 
than processors, SMT means you have work being dispatched that otherwise 
would be waiting.


Work that might be negatively impacted would be work that occupied close 
to 100% of a processor, and forced other work to wait. SMT would allow 
the other work to run improving overall throughput but reducing the 
speed of the first job.


That's the theory anyway - what does it look like in practice?

--
Andrew Rowley
Black Hill Software

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


Re: JAVA IDE

2023-08-23 Thread Andrew Rowley

On 24/08/2023 3:11 am, Kirk Wolf wrote:

To answer you question, for a real Java IDE, Java programmers generally believe 
that IntelliJ is the best and that's hard to argue with.I've used Eclipse 
for a really long time. If you are doing z/OS Java development, it's 
generally best to develop on your workstation and just deploy compiled jars to 
z/OS.


I use Eclipse, but it's mainly inertia preventing me from trying 
something else.


VS Code looks interesting because of the focus on supporting other z/OS 
languages, and the ability to edit datasets and files on the mainframe.


I have been playing with Java single file source code programs under 
Java 11 on z/OS, and that's a nice facility. It makes Java more like 
e.g. Rexx, in that you don't have to run a compile step. Does anyone 
know whether it's possible to set a classpath and have auto-complete and 
syntax checking using VS Code to edit a Java file on z/OS?


--
Andrew Rowley
Black Hill Software

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


Re: XCFAS and TRUSTED

2023-08-20 Thread Andrew Rowley

On 21/08/2023 9:28 am, Lennie Dymoke-Bradshaw wrote:


Secondly, when IBM states that a task should be given the attribute of Trusted, 
then I take it to mean that IBM is saying that the task can be trusted that 
this attribute cannot be the source of an exposure for that task.


I think when IBM says a task should be given trusted, it's a stronger 
statement than that.


I take it to mean that the task should never be denied access by the 
security system, and any denial of access risks the stability or 
operation of the system.


--
Andrew Rowley
Black Hill Software

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


Re: XCFAS and TRUSTED

2023-08-20 Thread Andrew Rowley

On 20/08/2023 8:53 pm, Mike Cairns wrote:

I worked at one site many years ago where the local specialist had actually 
tested across multiple IPL's the necessity for each and every one of these 
tasks to actually have the TRUSTED attribute and the conclusion was that many 
of these did not actually need to be TRUSTED and could manage perfectly fine 
using normal RACF access to resources granted via permissions to profiles.


I worked at a site which did a similar exercise. The risk is:

1) If the doc says it should be trusted, IBM are free to add functions 
that require access to other resources without documentating them. It's 
possible that IBM don't even consider what access would normally be 
required for an address space they specify as TRUSTED, or test it 
without TRUSTED.


2) There may be functions that are invoked only in unusual 
circumstances, so you only find out that access is missing when you are 
already dealing with a problem.


Not worth the risk, in my view (our security group disagreed!)

--
Andrew Rowley
Black Hill Software

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


Re: Looking for A Solution

2023-08-20 Thread Andrew Rowley

On 21/08/2023 1:14 am, Steve Beaver wrote:

On the zSeries I have created a .CSV.

The issue is I need a solution to send this .CSV to a list of email

Users that are very low skilled to their email accounts.  And this

Job needs to be hands-off so it can be scheduled.


You probably want a solution that sends mail direct to your corporate 
emil system rather than setting something up to handle mail on z/OS. 
Connecting using TLS is probably also desirable or required.


I would do it using Java. I wrote up an example a long time ago here:

https://www.blackhillsoftware.com/news/2017/06/21/sending-email-from-zos-using-java/

There are a few changes I would make based on what I know now, but the 
basics are there. There will be plenty of examples on the internet 
showing how to add attachments to an email from Java.


--
Andrew Rowley
Black Hill Software

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


Re: USS Features

2023-08-15 Thread Andrew Rowley

On 16/08/2023 6:17 am, Jon Perryman wrote:


This is absurd. Not all disk is cheap (e.g. GDPS). Not all data is valuable. 
While a person may be expensive, not everything they do is of value to the 
business and worth the hidden expenses.


It's not cents per GB PC cheap, but it's not 1990s expensive either.

If you have a meeting with a couple of people, schedule a change, get it 
approved, implement it... you could easily spend $1000 of people's time, 
not to mention add weeks to a project. How much disk space would that 
buy you, if you can avoid that cost and delay?


The IBM RDP systems charge $10/month for 5GB of disk space, which seems 
expensive. But still, $1000 of meetings avoided will pay for 40GB of 
space for a year.


What is the (ballpark) cost per GB on a real customer system? How much 
space is it worth to reduce the time spent managing it?



You can't be serious about being a storage admin. Every situation and company 
are different. Questions must be asked. How do you not understand adding 100GB 
to a filesystem has an impact on GDPS, HSM, backups, recovery and much more. If 
you believe, everything is created equal, 100GB has the same impact on a 10GB 
or 10TB filesystem. A file system may contain millions of Unix files but its 1 
MVS dataset. Recovery of a filesystem is risky at the best of times but add 
100GB increases the risks and may impact the nightly archival time (1 Unix file 
change causes HSM to backup the entire filesystem). If as you say, data is 
valuable, then the UNIX backup would be used. I could go on but I expect this 
should be obvious.


Whole filesystem backups are not very useful - really just a DR tool. 
What do you do if a user wants file(s) restored? Restore all their files 
from a point in time? Or restore the filesystem, mount it somewhere and 
manually copy files?


The whole filesystem backup takes us back to the problems with 
individual filesystems. You are going to back up a user's whole 
filesystem, including all the freespace from the largest file they ever 
deleted, because they logged on and updated .sh_history? Or worse - can 
the filesystem change indicator tell the difference between a data 
update and a metadata (e.g. last accessed date) change?


I'm not saying everything is equal, I'm just saying that freespace is a 
lot cheaper than managing a lack of freespace.


--
Andrew Rowley
Black Hill Software

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


Re: USS Features

2023-08-15 Thread Andrew Rowley

On 15/08/2023 10:09 am, Jon Perryman wrote:

This is z/OS with SYSPROGS, not Unix with sysadmins where programmers have full 
control to define reasonable. You keep asking the wrong question. Who (not 
what) determines reasonable. Right or wrong, it is their job, not yours. If you 
can't give up control of sysprog duties, then z/OS is not the OS for you.


I started on MVS in 1991, so it's a bit late to tell me that. I've 
*been* the storage admin.


Without evidence to the contrary, its a good idea to assume the fact 
that your colleagues are being paid means that they are doing work 
valuable to the business, and it's not the storage admin's job to veto 
it because it requires too much DASD space.


Its the storage admin's job to make sure that other people are not 
prevented from doing their work due to a lack of disk space. It's one of 
those jobs where the better you do, the less people know you're there.


Disk space is cheap. Data is valuable. People are expensive. Don't waste 
expensive people time managing empty space. Spend your time looking 
after the valuable data, and have enough free space that people don't 
need to stop what they are doing and set up a meeting with the storage 
admin group.


--
Andrew Rowley
Black Hill Software

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


Re: USS Features

2023-08-14 Thread Andrew Rowley

On 14/08/2023 3:30 pm, Jon Perryman wrote:

  > On Monday, August 7, 2023 at 04:33:24 PM PDT, Andrew Rowley 
 wrote:

It comes back to the question I asked earlier - how much space is it
reasonable to use *to do your job* before you have to get the storage
admin involved?

Since you put it that way, I've got to say are you insane. The storage admin 
based his decision on things called facts. He is responsible for storage and 
his decision is final until his management tells him otherwise. I suggest you 
inform your company CEO that all decisions must go through you.


That was a question, not a decision.

We all use space on the system, whether it be personal JCL libraries, 
sort work space, job output etc.


If your manager says "Can you investigate this CICS problem from 
yesterday" and you want to analyze the SMF data, at what point do you 
need to ask the storage admin for space for sort work, data files etc?


100MB? 1GB? 100GB?

I recognize that there has to be a limit where the storage admin has to 
be involved, but what is a reasonable value? Should it be different for 
a unix temporary file than for a sort work dataset?


Maybe I decide the best way to investigate this problem is to generate 
JSON from the data and load it into Splunk. Is the disk space available? 
Or should I just download the CICS SMF data to the PC and process it there?


Spool space, sort work space, user datasets - that space all comes from 
pools and when you delete the data the space is returned for use by 
other users. For some reason we set up a system for unix files where 
free space isn't automatically returned, and cannot be used by other 
users. This makes things unnecessarily difficult on the mainframe.


--
Andrew Rowley
Black Hill Software

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


Re: USS Features

2023-08-07 Thread Andrew Rowley

On 8/08/2023 12:56 am, Jon Perryman wrote:

It's absurd to allow everyone to do Proof Of Concept on z/OS. Are all POC vital to the 
business? Are POCs disruptive to the business? "me" mentality ignores the 
impact on everyone else. In this case, you're saying the storage admin is not impacted 
when clearly that's not the case.


It comes back to the question I asked earlier - how much space is it 
reasonable to use *to do your job* before you have to get the storage 
admin involved?


There can be good reasons to do it on z/OS, e.g. the source data is 
already on the system, data security on other platforms etc.


There is some irony in the contradiction between "z/OS because of its 
I/O capabilities" and "100GB! Whoa! Be reasonable!"


--
Andrew Rowley
Black Hill Software

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


Re: Automount (was USS Features)

2023-08-07 Thread Andrew Rowley

On 8/08/2023 12:37 am, Jon Perryman wrote:
Automount was created specifically to address some filesystem 
blemishes. There's a problem they needed to solved and they allowed 
people to continue without the use of automount. For those who choose 
automount, they decided that with all its faults, it solved more 
problems than it created.


IBM didn't create automount. It was a standard unix thing before IBM did 
unix. IBM just came up with the idea of HSM migrating home directories 
as a use case.


The primary problem with individual filesystems is that freespace 
doesn't get returned to the system. Deleted a file? The space still 
can't be used by someone else. If you accidentally fill up your 
filesystem, when you delete the file after all those "growing 
filesystem" messages: congratulations, you own the empty space.


The secondary problem is that migrating filesystems makes file and 
directory level management impractical.


# du --sh /home/*

# find /home -size 2G

Don't even think about it, unless you like HSM recalls.

File level backup also gets complicated when filesystems are migrated.

Pretty much all the problems that automounted individual filesystems are 
supposed to solve are actually a result of having individual 
filesystems. They don't have to be solved on other platforms because 
they didn't create them in the first place (or there is a better 
solution e.g. quotas).


--
Andrew Rowley
Black Hill Software

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


Re: Definition of mainframe? Was: Ars Technica

2023-07-31 Thread Andrew Rowley

On 1/08/2023 12:16 am, Rick Troth wrote:


But, again, an automount per user does not necessarily mean a 
filesystem per user.


Agree... but I was specifically talking about a filesystem per user as a 
bad thing. This seems to have become a common thing on z/OS.


--
Andrew Rowley
Black Hill Software

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


Re: USS Features

2023-07-30 Thread Andrew Rowley

On 31/07/2023 10:59 am, Steve Smith wrote:

Whatever.  We use automount, and the "space" wasted is way too trivial to
worry about.  And HSM can magically free up home filesystem zfs files that
aren't used any more.


If it's trivial, you're probably not using actually using it.

A low end laptop has 250GB available. How much space should a z/OS user 
be able to use (to do their job) before they have to make a special 
request to the storage management group? 10GB? 100GB?


Some of my testing runs to (temporarily) 100GB+ for input and output 
files. I run it on the PC because the space isn't available on the 
mainframe, but It would be nice to be able to run it on z/OS. If you get 
a few users with usage spikes to 100GB the space might not be so trivial.



gil answered that one... if you really have a good reason to go poking
around in users' business.
HSM recalls are the big problem with that. And authorized_keys is the 
sort of question where auditors might require you to be poking around in 
users' business.


--
Andrew Rowley
Black Hill Software

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


Re: Definition of mainframe? Was: Ars Technica

2023-07-30 Thread Andrew Rowley

On 31/07/2023 9:36 am, Paul Gilmartin wrote:

It mimics the MVS tradition of overallocating datasets.  Aren't modern
filesystems virtual and dynamically extensible?
They do dynamicaly expand. It's not growing that's the problem though, 
it's shrinking - releasing space so that it can be used by another user.

Hmmm... Use RACF to enumerate hone directories in OMVS segments.  The
"hard" then is just the performance cost of so many automounts.


One of the claimed advantages of automount was that user filesystems 
could be migrated by HSM. Enumerating the users is fine if the 
filesystems are all instantly available. If you have a few thousand that 
need to be recalled from HSM...


Does HSM release unused space from the filesystem when it is migrated 
and recalled, or do you need enough DASD to allocate all the empty space 
in all the filesystems?


--
Andrew Rowley
Black Hill Software

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


Re: Definition of mainframe? Was: Ars Technica

2023-07-30 Thread Andrew Rowley

On 30/07/2023 2:28 am, Jon Perryman wrote:

ASK YOURSELF: Name the z/OS Unix feature that sort of fixes the fundamental 
design flaw with Unix filesystems just described?

I suspect most people won't think about each user having a unique filesystem 
using automount to make their filesystem available. Typical Unix uses one file 
system with all users having directories in the /user directory.


An automounted filesystem per user has always been a terrible idea. I 
think it was given as an example of how you could use automount and 
somehow morphed into a recommendation. (Other OSes can e.g. use 
automount to mount a remote user filesystem via NFS).


Reasons it's a bad idea:

1) Freespace in the filesystem is not shared between users. This means 
that you need much more space than if there was one pool of freespace 
shared between all.


2) It makes simple questions like e.g. "Which users have a 
.ssh/authorized_keys file?" much harder to answer.


A filesystem per user is basically equivalent to a SMS storage group and 
catalog per user. You get isolation between users, but at the expense of 
much more difficult management.


--
Andrew Rowley
Black Hill Software

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


Re: Preferred FTP Client for Windows

2023-07-26 Thread Andrew Rowley

On 27/07/2023 8:32 am, Schmitt, Michael wrote:

FileZilla for GUI. Windows built-in FTP for command line, but...

There are NO (free) command line FTP clients for Windows that support passive 
mode AND work with the MVS file system. Zilch. Nada. NOT A SINGLE ONE.


For command line FTP on Windows, the Windows Subsystem for Linux (WSL) 
provides Linux versions of the FTP client. Much better than the original 
Windows version.


I also use IBM Explorer for z/OS for transferring things to OMVS. I'm 
not sure how easy it is to set it up as a file transfer solution to MVS 
datasets. It requires a component set up on z/OS, but the advantage is 
it uses https connections.


https://www.ibm.com/docs/en/explorer-for-zos


--
Andrew Rowley
Black Hill Software

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


Re: Need DFSORT control statements to extract data from smf15 with storclas blank

2023-07-24 Thread Andrew Rowley

On 24/07/2023 11:17 pm, Sri h Kolusu wrote:
Was that a typo ? Isn't it supposed to be SMF15SCN ? or you are using 
SMF14 record layout with SMF15 Interchangeably as they are both have 
the same layout? 


The SMF 14 and 15 layouts are the same, so there is one implementation 
for both. This aligns with the IBM SMF macros.


There is a Smf15Record class, but it just extends the Smf14Record class 
without adding anything. It's basically so you can create a Smf15Record 
object when you have a type 15 record, but the field names are still the 
smf14... names.


--
Andrew Rowley
Black Hill Software

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


Re: Need DFSORT control statements to extract data from smf15 with storclas blank

2023-07-23 Thread Andrew Rowley

On 22/07/2023 12:46 am, shivang sharma wrote:

Hi ,

I am not a DFSort expert but we have a requirement to extract datasets
which has storclas (SMF15SCN) = blank.


Not DFSORT, but this is what it looks like in Java using EasySMF:

import java.io.IOException;
import com.blackhillsoftware.smf.SmfRecordReader;
import com.blackhillsoftware.smf.smf15.Smf15Record;

public class NoStorClass
{
    public static void main(String[] args) throws IOException
    {
    try (SmfRecordReader reader = SmfRecordReader
    .fromName("//DD:INPUT")
    .include(15))
    {
    reader.stream()
    .map(record -> Smf15Record.from(record))
    .filter(r15 -> r15.smsClassSections().isEmpty()
    || r15.smsClassSections().get(0).smf14scn().equals(""))
    .forEach(r15 ->
    {
    System.out.format("%-24s %-8s %s%n",
    r15.smfDateTime(),
    r15.smf14jbn(),
    r15.smfjfcb1().jfcbdsnm());
    });
    }
    }
}

If you want only new datasets (I suspect you do) you can add another 
filter step:


.filter(r15 -> r15.smfjfcb1().jfcnew())


--
Andrew Rowley
Black Hill Software

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


Re: Problem running GIMUNZIP job.

2023-07-20 Thread Andrew Rowley

Maybe this problem?

https://community.rocketsoftware.com/discussion/miniconda-conflicts-with-bpxbatch


On 20/07/2023 8:10 pm, Gadi Ben-Avi wrote:

Hi,
I managed to find the problem.
My user was running a different shell which was causing the problem.
Once I reverted back to /bin/sh, everything started working.

Gadi

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of 
Colin Paice
Sent: יום ה 20 יולי 2023 11:35
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Problem running GIMUNZIP job.

I do not see //SYSOUT or //SYSPRINT in your JCL... try adding them.
//SYSPRINT DD SYSOUT=* etc
You might try adding ECHO  'BLAH' to the script so you know something will be 
displayed Colin

On Thu, 20 Jul 2023 at 08:46, Gadi Ben-Avi  wrote:


Hi,
We are in the process of installing z/OS v2.5 from z/OSMF.
One of the first jobs uses GIMUNZIP to create the new z/OS libraries.
When the job got to the SMPPTS library, we got these messages:
GIM43501S ** THE CALL TO THE BPX1WRT SERVICE FAILED WHEN PROCESSING

  
/tmp/izud-V110AVN-T1314651/unzip/smpe2023201100726173157/S0354.CB.S0354.CB.ST252475.SMPE.SMPPTS.pax.Z.
THE RETURN
  CODE WAS '0077'X AND THE REASON CODE WAS 'E329'X.
GIM47800S ** AN ERROR OCCURRED WHILE GIMUNZIP WAS PROCESSING ARCHIVE
ZSMSP9.CB.ST252475.SMPE.SMPPTS.
GIM20501IGIMUNZIP PROCESSING IS COMPLETE. THE HIGHEST RETURN CODE WAS
12.

Before the GIMUNZIP step, the job allocates a new ZFS and is supposed
to mount it at /tmp/izud-V110AVN-T1314651/unzip, but from what I can
see, this is does not happen, and the files are restores to /tmp,
which does not have enough space.

The job includes some shell scripts that are supposed to mount the
ZFS, but it doesn't look like they are running.

The step looks like:
//MOUNTEXEC PGM=BPXBATCH,COND=(0,LT)
//STDPARM  DD *
SH ;
mpdir=/tmp/izud-V110AVN-T1314651/unzip;
dsn='V110AVN.SWDEPL.T1314651.ZFS';
if   -e "$mpdir" ¤; then;
   rm -r $mpdir;
fi;
if   ! -e "$mpdir" ¤; then;
   echo "Work directory $mpdir will be created.";
   umask 077 ;
   mkdir -p -m 700 "$mpdir";
fi;
PATH=$PATH:/usr/sbin;
echo "Format the file system $dsn.";
zfsadm format -aggregate $dsn;
echo "Mount $dsn on $mpdir.";
mount -s nosetuid -t ZFS -f $dsn $mpdir;

There is no output in STDOUT or STDERR.

How can I see the output of the script to make sure it is actually running?

I would ask IBM, but this is running on z/OS v2.3, which is not
supported, and they won't help.

Thanks

Gadi



--
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

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


--
Andrew Rowley
Black Hill Software

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


Re: Python 3.11 on z/OS - UTF-8 errors

2023-07-12 Thread Andrew Rowley

On 13/07/2023 2:00 pm, kekronbekron wrote:

Andrew - could you please explain what you mean by "checkout in git as UTF8".


I mean setting the zos-working-tree-encoding for the file to UTF-8. I 
don't actually do this but it appears to be possible.


Git encodings are quite confusing. I find it frustrating that it seems 
to require you to tag every file added on z/OS, even if you have defined 
the encoding in .gitattributes.


I did briefly try Maven on z/OS but I think I had the same problem as 
you. I quickly decided I didn't need to do that and haven't investigated 
any further.


--

Andrew Rowley
Black Hill Software

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


Re: Python 3.11 on z/OS - UTF-8 errors

2023-07-12 Thread Andrew Rowley

On 13/07/2023 1:59 pm, Seymour J Metz wrote:

UTF-8 is just an encoding of Unicode; not a character set. All of ISO-8859-1 is 
part of Unicode.


Yes, but the code is stored in git as UTF-8 and defined as UTF-8 when 
working on other platforms. You can specify the 
zos-working-tree-encoding is ISO-8859-1... it seems like this conversion 
could cause problems.


Alternatively, zos-working-tree-encoding of UTF-8 presumably transfers 
the data without conversion, but it sounds like some programs have 
problems using it?


Normally, I think I want IBM-1047 which has the same potential 
conversion issues to/from git... you just have to be careful editing on 
other platforms.


--
Andrew Rowley
Black Hill Software

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


Re: Python 3.11 on z/OS - UTF-8 errors

2023-07-12 Thread Andrew Rowley

On 13/07/2023 10:01 am, David Crayford wrote:
We specify 
UTF-8 in 
our Maven builds as most of the time we are building off host on 
machines with UTF8 locales. However, we tag our files ISO8859-1 on z/OS 


...

If we cared about the euro sign we could change it to ISO8859-15 which 
is still an 8-bit character set. It’s those pesky codes above 0x7F in 
UTF-8 that cause the issues. 


Euro was just an example, there are plenty of other UTF-8 characters. If 
you convert to an 8 bit character set, does it mean that any literals 
with codes above 0x7F are silently broken? Or does git fail to checkout?


Either way, sourceEncoding=UTF8 seems like a good answer to why you 
might want to actually have the files encoded in UTF8. Anything else 
would seem to be courting unpredictable errors.


--
Andrew Rowley
Black Hill Software

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


Re: Python 3.11 on z/OS - UTF-8 errors

2023-07-12 Thread Andrew Rowley

On 13/07/2023 9:02 am, David Crayford wrote:

I'd like to understand your reasons for wanting to encode your Java source files in 
UTF-8. It's important to note that the default encoding on z/OS is IBM-1047 (EBCDIC). We 
typically use ISO8859-1 and have to specify the "-encoding iso8859-1" option 
when using the javac compiler. As mentioned earlier, tagging files as UTF-8 can lead to 
unexpected issues, which is why it's not commonly done.


I commonly see 
UTF-8 
specified for Java projects.


I have wondered how this works if you try to compile on z/OS. The 
obvious but possibly wrong answer would be to checkout in git as UTF8 
and tag the files.


If you encode as ISO8859-1, what happens to e.g. literals with 
characters not in ISO8859-1? An obvious one would be the Euro character, 
but I'm sure there are more.


--
Andrew Rowley
Black Hill Software

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


Re: SAS Replacement

2023-06-28 Thread Andrew Rowley

On 29/06/2023 9:12 am, Neil O'Connor wrote:

Have a look at Black Hill Software for SMF reports/graphs. See
https://www.blackhillsoftware.com/


Thanks Neil!

There is also a Java API as well as the Windows software. The Java API 
allows you to write custom reports and run them on the mainframe or 
other platforms.


The Java API can also convert SMF data to JSON format, so you can use 
any of the JSON reporting tools for queries, charts etc.


eg: https://github.com/BlackHillSoftware/easysmf-samples/tree/main/smf2json

--
Andrew Rowley
Black Hill Software

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


SMF Real Time Interface

2023-06-28 Thread Andrew Rowley
I have created a Java interface to the z/OS SMF Real Time Interface, and 
I am looking for people interested to try it out.


As background, the SMF Real Time Interface works in SMF logstream mode 
and allows you to define SMF in memory resources to receive different 
combinations of SMF records. Access to the in memory resources is RACF 
protected, and does not require exits or authorized code.


The Java interface makes it very easy to connect, read and disconnect 
from the SMF in memory resources.


I have put some samples on Github to show how it can be used: 
https://github.com/BlackHillSoftware/easysmf-samples/tree/main/easysmf-rti


There are samples to show:

 * Simple usage: connect, read, disconnect
 * Send SMF records in binary format to another system via HTTP
 * Send type 30 job end information in JSON format to another system
   via HTTP
 * Send SMS text messages from the mainframe for job failures using the
   Twilio Java API.

These will hopefully give some ideas about how it might be used.

Andrew Rowley


--
Andrew Rowley
Black Hill Software

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


Re: [EXTERNAL] Re: z/OSMF

2023-06-27 Thread Andrew Rowley

On 27/06/2023 11:35 pm, Pommier, Rex wrote:

If a company is using a 20 MSU system and is forced to buy a 200 MSU system because that's the 
smallest available, unless something drastic happens to hardware AND software pricing, the company 
isn't going to be looking for "what else can I put on this expensive and woefully 
underutilized machine", they're going to be looking at "where can I move my 20 MSUs worth 
of processing to get rid of this expensive machine".


Again, the assumption is that the pricing was adjusted so it was not 
more expensive.


200 MSU was just to pick a number. It probably should be higher. What is 
the speed of a desktop PC these days? I am guessing my 4 year old PC is 
around 600-700 MSU equivalent? A Raspberry Pi about 40-60 MSU? And 4 or 
more cores makes a lot of problems go away.


It would be good if z/OS at the low end had kept up with the performance 
and price improvements in the rest of the industry.


--
Andrew Rowley
Black Hill Software

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


Re: z/OSMF

2023-06-27 Thread Andrew Rowley

On 27/06/2023 5:40 pm, Gibney, Dave wrote:

200 MSU was much more than we needed. Maybe 20 or so at our peaks. And the z/OS 
and ISV charges at 200 levels would have been intolerable.


That's why I keep qualifying it with ISVs would have to adjust their 
pricing. While the smallest system is 13 MSU they have no reason to do 
that, but if the smallest available system was 200 MSU I think they 
would be forced to adjust.


If you are using 100% of a 20 MSU system, z/OS is just an expensive 
system that can't do much more than run the stuff still around from the 90s.


If you are using 20 MSU of a 200 MSU system, it's an expensive system 
hugely underutilized, and maybe people start asking what work can be 
moved there, how to make better use of the data it contains etc?


--
Andrew Rowley
Black Hill Software

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


Re: z/OSMF

2023-06-27 Thread Andrew Rowley

On 27/06/2023 3:07 pm, Timothy Sipples wrote:
IBM doesn't require anyone to order/configure less than 200 MSUs 
(PCIs) of general purpose processor capacity. If you want to order a 
configuration like that go for it! 


Of course you can choose to configure larger machines, but these 
smallest configurations make no sense. They only exist due to software 
pricing. They are too small to seriously consider for any modern work, 
including it seems advances in z/OS itself i.e. z/OSMF.


I mean, yes, ISVs and IBM can write software to run on them but why 
should they be so limited? Why not take advantage of advances that have 
happened on other platforms?


You can't buy e.g. Intel systems with performance limited to the same as 
20 years ago.


If IBM made the smallest orderable system comparable to e.g. small-mid 
Intel systems customers would actually have some capacity to move new 
work to z/OS. Obviously software pricing would have to be adjusted so 
customers could afford it. I guess that's why IBM don't do it - no-one 
can figure out what to do with the pricing increments between 13-200 MSU.



here's the current minimum orderable machine configuration (latest model) for 
z/OS and VSEn:

* IBM z16 A02 (or AGZ for rack mount)
* Capacity Model A01
* Base CP capacity: 105 PCIs (13 MSUs)


I don't have access to this type of system to test, but it would be very 
interesting to run my Java CICS SMF reporting on this system and compare 
to a Raspberry Pi. I would have a small wager on the Raspberry Pi.



Add just 1 zIIP and you get ~1,900 PCIs of full-time zIIP capacity with 2 
processor threads (SMT2). You can add as many zIIPs as you wish up to the 
physical capacity of the machine.


1 zIIP is obviously much better for Java, but if we were to compare it 
to e.g. my laptop, my money would be on the laptop.


--
Andrew Rowley
Black Hill Software

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


Re: z/OSMF

2023-06-26 Thread Andrew Rowley

On 27/06/2023 11:52 am, Tom Brennan wrote:
I haven't used z/OSMF myself so bear with me, but if it runs as a java 
application, doesn't that allow the possibility of running some kind 
of agent on the mainframe, and moving the heavy stuff (whatever that 
is) off to a 5 year old laptop?


Not really - Java is just a programming language. Like any language, you 
can run part of your application here and part there if you build a 
communications architecture, have the data in the right places etc. But 
you can't just divide the application without doing the design work.


z/OSMF does actually run part on z/OS and part in your browser 
(Javascript I assume) but the parts that access z/OS services, read z/OS 
data etc. need to be on the mainframe. I doubt there is much that can be 
practically offloaded.


(On the other hand, I think the mainframe side performance could be 
greatly improved. Having looked at the SMF data from z/OSMF startup, I 
suspect the startup time could be cut by 90%+ with a bit of tweaking...)


--
Andrew Rowley
Black Hill Software

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


Re: z/OSMF

2023-06-26 Thread Andrew Rowley

On 26/06/2023 8:13 pm, Timothy Sipples wrote:
That said it's typically a "really good idea" to configure machines 
running z/OS with at least one zIIP — and not just for z/OSMF but for 
myriad other reasons. 


I've said it before but I'll say it again - to avoid embarrassment 
alongside 5 year old laptops or perhaps even a Raspberry Pi, IBM needs 
to figure out how to bring the smallest z/OS systems up to a modern 
configuration - I would suggest minimum 4 processors and 200 MSU.


With z/OSMF, IBM has become a victim of their own policies. Software 
licensing has really strangled the low end of the mainframe market. IBM 
and ISVs need to figure out how to reverse this i.e. modified pricing so 
customers can move to larger machines.


At a time when a laptop has 10 physical/12 logical processors, "one 
zIIP" isn't much better. zIIPs and System Recovery Boost seem to be a 
kludge to work around the dire lack of processing capacity in these 
systems anyway. (zIIP does benefit me because I write Java, but I can 
still see it's a bad solution.)


--
Andrew Rowley
Black Hill Software

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


Re: SMTP and OAuth

2023-06-14 Thread Andrew Rowley

On 14/06/2023 11:57 pm, Tony Thigpen wrote:

Asking for a VSE shop so he can answer an auditing 'request':

Are there any SMTP clients on z/OS that support OAuth?



I haven't used or tested it for OAuth, but Java usually provides an easy 
way to implement functions used on other platforms on z/OS. I would 
expect the JavaMail/Jakarta Mail OAuth examples to work on z/OS.

https://javaee.github.io/javamail/OAuth2

It should be usable stand alone, and it looks like it is included in 
WebSphere Liberty?

https://www.ibm.com/docs/en/was-liberty/base?topic=features-javamail-16

It depends what you mean by a client I guess, whether Java support 
counts or if you are looking for a pre-built product.


--
Andrew Rowley
Black Hill Software

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


Re: The new requirement for Certificates to communicate with IBM -- A Journey

2023-06-12 Thread Andrew Rowley

On 13/06/2023 8:04 am, Tom Longfellow wrote:

I am beginning to suspect some new evil is afoot in the land of Java -- 
complete with unhelpful cryptic error messages.
How old is your Java installation, and how old are the certificates 
required?


It's possible that e.g. Java hasn't been updated to include new root 
certificates.



--
Andrew Rowley
Black Hill Software

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


Re: The new requirement for Certificates to communicate with IBM -- A Journey

2023-06-12 Thread Andrew Rowley

On 12/06/2023 2:59 pm, Tom Longfellow wrote:

I am worn out from all of these "learning" opportunities and want to get back to 
"doing" the job I am paid to do.


IBM doesn't do its customers any favors with the way they handle 
certificates.


Every other operating system installs default trusted certificates, and 
all this "just works" (mostly). IBM has decided they don't want to tell 
customers who to trust, but the reality is that this makes communication 
over the internet difficult or impractical.


It's even more difficult because RACF is different to everything else 
out there, so it's hard to find examples.


I accept that IBM has customers who need to do their own vetting of CAs. 
However, IBM could provide e.g. a separate optional FMID that installed 
a set of trusted certificates updated by PTF, the same as other 
operating systems. Customers could select whether or not the standard CA 
certificates were installed.


That would make life much easier for customers who just want to use TLS 
for internet connections, and leave vetting CAs to their operating 
system vendors.


--
Andrew Rowley
Black Hill Software

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


Re: The new requirement for Certificates to communicate with IBM -- A Journey

2023-06-10 Thread Andrew Rowley

On 11/06/2023 12:17 am, Tom Longfellow wrote:

Has anyone managed to accomplish this using the power of the mainframe without 
ruffling the feathers of the Windows/Browser world?
I have full certificate management powers under RACF on the mainframe.   I just 
do not have a usable Certificate to Import and Add to the SMPE KeyRing.


I wonder whether certificates can be exported from the Java keystore on 
z/OS for import into RACF?


--
Andrew Rowley
Black Hill Software

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


Re: Are there samples of COBOL methods or classes?

2023-05-29 Thread Andrew Rowley

On 29/05/2023 8:40 am, Tom Ross wrote:

...  The real
worl is not object oriented...we do no instantiate a customer object and then
invoke a 'send_a_bill' method on that object.  We procedurally decide that it
is time to send a cusotmer a bill and do it!


I'm not sure I would agree... it probably depends on what sort of code 
you work with, but I think it would be extremely common to have a 
customer object and to have a bill object. Then e.g. you might have 
dozens of ways line items might be added to a bill, but the bill checks 
its status when you try to add an item and won't allow it if the bill 
has already been sent.


A program always has a sequence of actions i.e. a procedure, but with 
well designed object classes you don't need to know the procedures 
beforehand.



  Re-usable tested mehods that could be re-used to build
applications  it just not really happening!


It's happening a lot!

--
Andrew Rowley
Black Hill Software

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


Re: Digitally signed product software packages from IBM

2023-05-25 Thread Andrew Rowley

On 26/05/2023 4:28 am, Kurt J. Quackenbush wrote:

Glad to hear it works great and "management will love it."  If you find value 
in this capability I encourage you to reach out to your other software providers and 
request they also start signing their packages.  I know one in particular is already 
working on it, but not sure about the many others.

What about non-SMP/E delivered software?

What would be nice to see is a function where e.g. APF and linklist 
libraries at least were required to be signed. I know there was a 
discussion some time back on the difficulties with load modules due to 
reblocking etc.


However, we can also sign things on z/OS e.g. SMF data. So you could 
have a local signing key usable for functions like the binder and 
IEBCOPY, and under certain conditions e.g.

- all input is signed
- IEBCOPY etc. is APF authorized
the reblocked module is signed with the local key, maintaining a chain 
of signatures that can be validated back to the original package.


Other components (panels etc.) would be much easier to validate a 
signature. So it would be nice to be able to look at everything and see 
that it is either unchanged from a vendor, or something modified locally.


--
Andrew Rowley
Black Hill Software

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


Re: COBOL to dynamic DD name

2023-04-28 Thread Andrew Rowley

On 29/04/2023 11:48 am, Paul Gilmartin wrote:

Obviously a complete Java program needs very few comments.


Fair point... although I would contend that a Java program without 
comments is easier to understand than DFSORT control statements! Here is 
a version with comments (again, untested):


import java.io.*;
import java.util.*;
import com.ibm.jzos.*;
import com.ibm.jzos.fields.*;
import com.ibm.jzos.fields.daa.*;

public class App
{
    public static void main(String[] args) throws IOException
    {
    // define JZOS fields for the key, count and ddname
    BinaryUnsignedIntField keyField = new BinaryUnsignedIntField(0, 2);
    BinaryUnsignedIntField countField = new 
BinaryUnsignedIntField(4, 4);

    StringField ddField = new StringField(8, 8);

    // variable to save the current header record
    // I'm not sure I understand the input data i.e. why this is
    // necessary but I think this matches the logic from the File 
Manager

    // sample
    byte[] nextHeader = null;

    // map of ddname -> OutEntry containing RecordWriter and count
    Map outEntries = new HashMap<>();

    RecordReader input = null;
    try
    {
        // open the input dataset
        input = RecordReader.newReaderForDD("INPUT");
        int bytesRead = 0;

        // create a buffer for the input record
        byte[] record = new byte[input.getLrecl()];
        // read records
        while ((bytesRead = input.read(record)) >= 0)
        {
            if (keyField.getInt(record) == 0) // if key is zero
            {
                // copy and save the header record to a new byte array
                nextHeader = Arrays.copyOfRange(record, 0, bytesRead);
            }
            else
            {
                // get the ddname from the record
                // (this probably doesn't match the File Manager 
sample -

                // might need to concatenate/substring etc)
                String ddname = ddField.getString(record);

                // find the output entry for this ddname
                OutEntry out = outEntries.get(ddname);

                if (out == null) // doesn't exist: this is the 
first record for database

                {
                    out = new OutEntry(ddname);   // create/open a 
new entry

                    outEntries.put(ddname, out);  // save it in the map
                    out.writer.write(nextHeader, 0, 
nextHeader.length); // write the saved header entry

                }
                out.count++; // increment record count for this entry
                countField.putInt(out.count, record);   // update 
sequence in the record
                out.writer.write(record, 0, bytesRead); // write 
the record

            }
        }
    }
    finally // close all files
    {
        if (input != null)
            input.close();
        for (OutEntry entry : outEntries.values()) // each output 
writer

        {
            entry.writer.close();
        }
    }
    }

    /**
     * A class to keep a RecordWriter and count for each ddname
     * best practice would be to encapsulate with getters/setters
     * but we're trying to keep things simple for the sample
     */
    private static class OutEntry
    {
    OutEntry(String ddname) throws IOException
    {
        // open a RecordWriter for the supplied ddname
        writer = RecordWriter.newWriterForDD(ddname);
    }
    int count = 0;
    RecordWriter writer;
    }
}




--
Andrew Rowley
Black Hill Software

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


Re: COBOL to dynamic DD name

2023-04-28 Thread Andrew Rowley

On 29/04/2023 6:29 am, Schmitt, Michael wrote:

I have an input file that contains thousands of records. They are in groups: 
header record, then a bunch of segments all for one database name, then another 
header, records for another database. But the same database can appear more 
than once in the input.


Have you considered Java?

This is untested, and I don't know File Manager so I'm not 100% sure of 
the logic or even the field definitions, but it should give you the 
idea. Run under JZOS Batch Launcher so JCL DDs are available.


A complete Java program:

import java.io.*;
import java.util.*;
import com.ibm.jzos.*;
import com.ibm.jzos.fields.*;
import com.ibm.jzos.fields.daa.*;

public class App
{
    public static void main(String[] args) throws IOException
    {
    BinaryUnsignedIntField keyField = new BinaryUnsignedIntField(0, 2);
    BinaryUnsignedIntField countField = new 
BinaryUnsignedIntField(4, 4);

    StringField ddField = new StringField(8, 8);

    byte[] nextHeader = null;

    Map outEntries = new HashMap<>();
    RecordReader in = null;
    try
    {
        in = RecordReader.newReaderForDD("INPUT");
        int bytesRead = 0;
        byte[] record = new byte[in.getLrecl()];
        while ((bytesRead = in.read(record)) >= 0)
        {
            if (keyField.getInt(record) == 0)
            {
                nextHeader = Arrays.copyOfRange(record, 0, bytesRead);
            }
            else
            {
                String ddname = ddField.getString(record);
                OutEntry out = outEntries.get(ddname);
                if (out == null)
                {
                    out = new OutEntry(ddname);
                    outEntries.put(ddname, out);
                    out.writer.write(nextHeader);
                }
                out.count++;
                countField.putInt(out.count, record);
                out.writer.write(record, 0, bytesRead);
            }
        }
    }
    finally
    {
        if (in != null)
            in.close();
        for (OutEntry entry : outEntries.values())
        {
            entry.writer.close();
        }
    }
    }

    private static class OutEntry
    {
    OutEntry(String ddname) throws IOException
    {
        writer = RecordWriter.newWriterForDD(ddname);
    }
    int count = 0;
    RecordWriter writer;
    }
}

--
Andrew Rowley
Black Hill Software

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


Re: zOSMF and zOWE for non-mainframers

2023-04-16 Thread Andrew Rowley

On 1/03/2023 9:01 am, Andrew Rowley wrote:

The Achilles heel for Java on z/OS seems to be dataset I/O. It's 
adequate, but feels like it should be faster. (I haven't actually done 
direct comparisons with other languages.)


Following up an old post of my own here, because I did actually compare 
the JZOS RecordReader to other languages (C and Assembler).


It turns out I was wrong, and the Java I/O using RecordReader seems to 
be close to the speed of Assembler and C. Certainly not slow as I 
thought. So Java is fast all round.


Incidentally, zEDC compressed datasets give a big boost in I/O speed for 
reading SMF data in my testing, e.g. 2-5x faster. This was tested on 
the  on the Dallas RDP system under VM - I don't know whether VM affects 
I/O performance.


--
Andrew Rowley
Black Hill Software

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


Re: Just PDSE

2023-04-10 Thread Andrew Rowley

On 8/04/2023 2:23 pm, Brian Westerman wrote:

Just so you know, it's not SYSPLEX that you need, it's GRS and you have have 
that with just a couple FICON ports.


Are you sure about that? Regular PDS needs GRS to safely share between 
multiple systems, if that was all that was required no-one would have 
additional issues with PDSE.


Just because it hasn't happened doesn't mean you are not vulnerable to 
data corruption with the right set of circumstances.


--
Andrew Rowley
Black Hill Software

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


Re: Unzip on z/OS ?

2023-03-30 Thread Andrew Rowley

On 31/03/2023 8:05 am, Schmitt, Michael wrote:

What if the requirement is to compress or decompress an area of memory, by 
calling something from a COBOL CICS transaction running on z/OS, in a way that 
it could be compatibly decompress or compress by a program running on another 
platform?

For example: CICS > compress > send across some communication path > transaction on 
Linux > program > decompress > same data as started with

The actual algorithm isn't critical, as long as it is compatible on both ends.

The compressed data isn't in a file, nor are jobs being run. This is 
transaction processing.
This sounds like a description of HTTP compression. I don't know the 
details inside CICS, but it seems likely that if "some communication 
path" can be HTTP this might be as simple as turning on compression in 
the HTTP server and/or requesting it in the HTTP client. I would expect 
that CICS Liberty would be able to do this. zOSMF Liberty certainly does.


Liberty will use zEDC if available (zEDC doesn't work with Java 11 yet, 
only Java 8).


--
Andrew Rowley
Black Hill Software

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


Re: Stop the ragging on COBOL please [was: RE: ASM call by value]

2023-03-28 Thread Andrew Rowley

On 28/03/2023 9:34 pm, Seymour J Metz wrote:

I once found myself defending the common idiom

for (;;) {
   foo;
}

as a perfectly clear DO FOREVER.


I'm not sure that it is completely clear, it depends on knowledge if 
whether the empty statement evaluates as true or false - or just a guess 
that do forever is more likely than do never...


Personally, I prefer something like:

while (TRUE)
{

}

--
Andrew Rowley
Black Hill Software

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


Re: watching JIT generated machine instructions on z/OS

2023-03-22 Thread Andrew Rowley

On 23/03/2023 11:39 am, David Crayford wrote:
FYI, the OpenJ9 JIT can implement JIT intrinsics to generate native 
decimal instructions when running on z/OS. IBM have open source OpenJ9 
and OMR so you can snoop around the code 
https://github.com/eclipse-openj9/openj9/blob/master/jcl/src/openj9.dataaccess/share/classes/com/ibm/dataaccess/DecimalData.java


More interesting is:
https://github.com/eclipse-openj9/openj9/blob/master/jcl/src/java.base/share/classes/com/ibm/jit/BigDecimalExtension.java

since that implies DFP is used for BigDecimal calculations.

However, BigDecimal is immutable so by specification calculations create 
a new object for every intermediate value. Hopefully the compiler can 
optimize away most of them, if you require maximum performance.


--
Andrew Rowley
Black Hill Software

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


Re: watching JIT generated machine instructions on z/OS

2023-03-22 Thread Andrew Rowley

On 23/03/2023 3:42 am, René Jansen wrote:

Does anybody know how to ask the J9 (Java 8) on z/OS how to show me what it 
does when the JIT decides native code would be best?
I think it is difficult to pin down the native code because the JIT is 
not a one-time, fixed output compiler.


Java can monitor the execution of code and come back and perform further 
optimization on hot areas of code. The docs even talk about "optimistic 
optimization" where certain assumptions are made and the code can later 
be de-optimized if they turn out to be false. So trying to look at 
specific machine code seems like a problem.


What types does the code use? I don't see a built in decimal type other 
than BigDecimal, so the opportunity for Java to use DFP instructions 
seems limited - but I don't really know.


My inclination would be to try to get some performance figures for the 
Java code using e.g. JMH (which provides warmups etc. to trigger JIT 
optimizations) and try to build the equivalent the other language.


Benchmarks have their pitfalls, but it's probably still better than 
trying to compare the native code.


--
Andrew Rowley
Black Hill Software

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


Re: Question for our international friends (mostly)

2023-03-18 Thread Andrew Rowley

On 18/03/2023 11:54 pm, Bob Bridges wrote:

Now that you mention this, I guess I'm being inconsistent when I say "see eye see ess" and "eye em 
ess", but privately chuckle when ignorami say "are ay see eff" instead of "rack-eff".

RACF always amused me, because "rack off" is a (Australian?) way to 
somewhat rudely tell someone to go away. So, "I tried to log on,  but 
RACF told me to rack off."


It's an accidentally great name for a security product.

--
Andrew Rowley
Black Hill Software

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


Re: not using SMPe

2023-03-17 Thread Andrew Rowley

On 17/03/2023 9:20 am, Jeremy Nicoll wrote:

But doesn't the vendor already have to understand whether or not
separate changes they've made to their product affect each other?


In theory yes, in practice you rely a lot on the compiler to verify 
calls between modules etc. It's much easier to do in source code than 
with object modules, and in high level languages the compiler does the 
checking much more accurately than any other process could.


Shipping exactly what you built rather than individual pieces of it is 
much easier and less error prone.


Obviously larger thing like an operating systems have components that 
are updated individually, but for a moderately sized self contained 
application full replacement makes a lot of sense. It's also usually 
less work for the customer - as long as the installation is well 
designed so customization doesn't have to be repeated.


--
Andrew Rowley
Black Hill Software

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


Re: not using SMPe

2023-03-15 Thread Andrew Rowley

On 16/03/2023 12:01 pm, Warren Brown wrote:

  Andrew, I have been out for a while.  Is there a replacement for SMPE ?
Warren
There have always been ways to deliver software without using SMP/E e.g. 
datasets dumped to tape. As people have noted, you can also deliver what 
is effectively a full replacement via SMP/E. Serverpac etc. could 
probably be considered a non-SMP/E install, even though what you are 
installing is a SMP/E environment.


But now, yes, there is an official IBM supported non-SM/PE installation 
method using a z/OSMF portable software instance. A PSI can also deliver 
a SMP/E environment of course.


--
Andrew Rowley
Black Hill Software

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


Re: not using SMPe

2023-03-15 Thread Andrew Rowley

On 16/03/2023 9:33 am, Ed Jaffe wrote:

Not true. It simply means if you change the (non-fixed) interface, you 
must re-issue all affected components.


OK yes... I did say that you could change the interface with 
corresponding pre and co-reqs. And if you just want to change one of the 
dependent components, you then need to go back and install the other 
fix, and end up changing all the other dependencies, plus anything they 
pull in etc...


Not everyone loves chasing pre-req chains in SMP/E. Plus the vendor 
needs to track it all somehow and build those chains.




That said, we have been having great luck lately using ++JARUPD 
instead of ++JAR for many of our Java-based components and people seem 
to like it!



OMG WTF I hadn't discovered ++JARUPD. That sounds like a terrible idea.

Java is a bit of a special case because it is JIT compiled, so you do 
get compiler optimizations from inlining etc. But I don't see the point 
of partial updates to jar files. You throw away all the checking that 
the javac compiler did when it compiled the code, and errors are more 
likely to slip through and be discovered by the customer rather than in 
the build environment. Even more so now with JPMS, which is complex 
enough just building a jar file.


--
Andrew Rowley
Black Hill Software

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


Re: not using SMPe

2023-03-15 Thread Andrew Rowley

On 15/03/2023 8:33 am, Jay Maynard wrote:

That's because SMP/E and its power are only truly present in the z/OS and
predecessors world. Everyone else thinks of applying maintenance as a
matter of replacing the entire product, instead of individual fixes that
are automatically maintained and managed.


The problem with individual fixes rather than full replacement is that 
it means the interface for every individually replaceable component is 
fixed. The relationships between all components need to be tracked, and 
any interface change needs corresponding pre-reqs or co-reqs for 
everything that uses it.


That had to be done anyway when everything was coded in assembler. With 
high level languages it becomes much easier to do at compilation time. 
The compiler will find the relationships and make sure all dependent 
changes happen.


Separate modules also limit compiler optimizations, because calls 
between routines are one of the common opportunities for optimization 
(inlining etc).


It's still possible to ship individual fixes if necessary, but that is 
done in source code using git etc., still shipped as a full replacement. 
You end up with a branch or tag in git that represents the exact code 
that a customer is running.


There is much more overhead and opportunity for error shipping 
individual components than full replacement. With the bandwidth etc. 
available now full replacement makes much more sense.


--
Andrew Rowley
Black Hill Software

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


Re: zOSMF

2023-03-06 Thread Andrew Rowley

On 7/03/2023 2:43 pm, Mike Schwab wrote:

a zIIP gives adequate performance, otherwise takes 90 minutes to start
up, on z/OS 2.5..


Not disagreeing with other criticisms of zOSMF, but IBM and ISVs need to 
get together and find an affordable way to get customers onto systems 
with a modern level of performance. Modern performance probably means 
minimum of 4 CPs and 300 MSU. That would probably put them somewhere 
alongside low end desktop PCs. On my development z/OS system, which runs 
Java about the same speed as my laptop, zOSMF starts in about 1 minute.


My software is Java so I love zIIPs, but in reality they are a band-aid 
over the real problem - that software pricing has held back performance 
to the point that small systems are disadvantaged compared to just about 
any other platform. zIIPs were probably a mistake - they allowed IBM to 
ignore the performance issues with small systems for far to long.


It's ridiculous that mainframes require software designed for such small 
systems. We might enjoy the challenge, but it's just killing the platform.


--
Andrew Rowley
Black Hill Software

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


Re: Mainframe REXX (Re: Badmouthing Rexx and ooRexx - again (Re: zOSMF and zOWE for non-mainframers

2023-03-02 Thread Andrew Rowley

On 3/03/2023 1:36 am, David Spiegel wrote:
Every time I've watched mainframe Java since OS/90 V1, it has been 
painfully slow. Have you ever watched a WAS startup? ... It takes 
about 15 minutes on the fastest mainframes.


I think that's a reflection on WAS, not Java.

When I was playing with the software drag racing, I compared the times 
from SMF to get an idea of the Java startup etc. overhead.


For a 5 second elapsed time of 5 seconds timed inside the program, SMF 
showed:

C++ : 5.02 seconds elapsed, 4.95 seconds CPU time
Java: 6.16 seconds elapsed, 5.24 seconds CPU time.

So the overhead to start Java looked to be around 1 second elapsed, and 
1/4 second of CPU time. After the startup, Java was as fast as C++ in 
this test.


--
Andrew Rowley
Black Hill Software

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


Re: zOSMF and zOWE for non-mainframers

2023-02-28 Thread Andrew Rowley

On 28/02/2023 11:28 pm, Seymour J Metz wrote:

What about Java? How well does JIT work?


Java and the JIT compiler is very good. It always depends on the 
benchmark. For some stuff I think it's close to C. JIT compiles to 
machine code, and there are optimizations available in a JIT compiler 
that are not available to a regular compiler so there's no reason it 
wouldn't be fast. If your CPs are not full speed the zIIP gives an extra 
speed bonus.


There is a cost to start the JVM. On my system that seems to be roughly 
1 second each time you run a Java program. This is where Rexx etc gain 
an advantage for small programs.


The Achilles heel for Java on z/OS seems to be dataset I/O. It's 
adequate, but feels like it should be faster. (I haven't actually done 
direct comparisons with other languages.)


--
Andrew Rowley
Black Hill Software

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


Re: zOSMF and zOWE for non-mainframers

2023-02-26 Thread Andrew Rowley

On 25/02/2023 8:03 am, Bob Bridges wrote:

Oh, I was going to mention that surely allocating datasets, either in batch or 
TSO, has got to seem like one of the dumbest and most incomprehensible things 
we do on the mainframe, to a foreigner.


Allocating datasets shouldn't be that hard to grasp. "Dataset" is 
actually a pretty common term and generally implies a collection of data 
with more structure than just a file.


If people have worked with databases, presumably they have encountered 
the concept of defining the schema.


A dataset is simply a collections of records (similar to a database 
table) where each record has a fixed length or limited variable length 
and the total collection has a size limit. Any structure within the 
records is up to the application. This is not an unusual construct.


What is unusual is that z/OS uses such a structured format for almost 
everything, not that it exists.


--
Andrew Rowley
Black Hill Software

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


Re: zOSMF and zOWE for non-mainframers

2023-02-26 Thread Andrew Rowley

On 25/02/2023 4:23 am, Farley, Peter wrote:

The other issue is CPU usage in today's frequently-CPU-constrained-due-to-cost 
mainframe shops.

This is a major issue on z/OS today.

My laptop has 10 cores/12 logical processors. I'm developing on the 
laptop for z/OS. I constantly have to be aware that my code needs to run 
in an environment with much less capacity.


With CPU power in such abundance everywhere else, it makes perfect sense 
to spend CPU time to save developer time. A computing platform where CPU 
capacity is so constrained becomes hard to justify.


--
Andrew Rowley
Black Hill Software

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


Re: determine job that created dataset?

2023-02-15 Thread Andrew Rowley
If you are not into SAS, here is Java to do a similar thing using 
EasySMF Java API:


public class DatasetAccess
{
    public static void main(String[] args) throws IOException
    {
    List targetDatasets = Arrays.asList(
    new String[]{
    "SYS1.PARMLIB",
    "SYS1.PROCLIB"
    });

    // SmfRecordReader.fromName(...) accepts a filename, a DD name 
in the
    // format //DD:DDNAME or MVS dataset name in the form 
//'DATASET.NAME'


    try (SmfRecordReader reader = SmfRecordReader.fromName(args[0])
    .include(14)
    .include(15)
    .include(17)
    .include(18)
    .include(61)
    .include(62)
    .include(64)
    .include(65)
    )
    {
    reader.stream()
    .map(record -> new AccessInfo(record))
    .filter(accessInfo -> 
targetDatasets.contains(accessInfo.dataset))

    .limit(1000)
    .sorted(Comparator
    .comparing(AccessInfo::getDataset)
.thenComparing(AccessInfo::getSmfDateTime))
    .forEachOrdered(accessInfo ->
    System.out.format("%-44s %-24s %-10s %-4s %-8s%n",
    accessInfo.getDataset(),
    accessInfo.getSmfDateTime(),
    accessInfo.getEvent(),
    accessInfo.getSystem(),
    accessInfo.getJobname()
    ));
    }
    }

    private static class AccessInfo
    {
    public AccessInfo(SmfRecord record)
    {
    smfDateTime = record.smfDateTime();
    system = record.system();
    switch (record.recordType())
    {
    case 14:
    case 15:
    {
    Smf14Record r14 = Smf14Record.from(record);
    event = record.recordType() == 14 ? "Read" : "Update";
    dataset = r14.smfjfcb1().jfcbdsnm();
    jobname = r14.smf14jbn();
    break;
    }
    case 17:
    {
    Smf17Record r17 = Smf17Record.from(record);
    event = "Scratch";
    dataset = r17.smf17dsn();
    jobname = r17.smf17jbn();
    break;
    }
    case 18:
    {
    Smf18Record r18 = Smf18Record.from(record);
    event = "Rename";
    dataset = r18.smf18ods();
    jobname = r18.smf18jbn();
    break;
    }
    case 61:
    {
    Smf61Record r61 = Smf61Record.from(record);
    event = "ICF define";
    dataset = r61.smf61enm();
    jobname = r61.smf61jnm();
    break;
    }
    case 62:
    {
    Smf62Record r62 = Smf62Record.from(record);
    event = "VSAM open";
    dataset = r62.smf62dnm();
    jobname = r62.smf62jbn();
    break;
    }
    case 64:
    {
    Smf64Record r64 = Smf64Record.from(record);
    event = "VSAM status";
    dataset = r64.smf64dnm();
    jobname  = r64.smf64jbn();
    break;
    }
    case 65:
    {
    Smf65Record r65 = Smf65Record.from(record);
    event = "ICF delete";
    dataset = r65.smf65enm();
    jobname = r65.smf65jnm();
    break;
    }
    default:
    {
    event = Integer.toString(record.recordType());
    dataset = "Unknown";
    jobname = "Unknown";
    break;
    }
    }
    }

    public String getEvent() { return event; }
    public String getSystem() { return system; }
    public String getDataset() { return dataset; }
    public String getJobname() { return jobname; }
    public LocalDateTime getSmfDateTime() { return smfDateTime; }

    private String system;
    private String event;
    private String dataset;
    private String jobname;
    private LocalDateTime smfDateTime;
    }
}

--
Andrew Rowley
Black Hill Software

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


Re: Are JNI required to be re-entrant and/or re-usable?

2023-02-15 Thread Andrew Rowley

On 14/02/2023 1:53 am, Steve Austin wrote:

Yes you are correct, and the assembler program would need to be added to
the program class. I had had hoped to find documentation to confirm what
I've seen and maybe find a way around it, but no luck so far.
I don't have exact documentation to hand, but I would be surprised if it 
was not required to be reentrant. It's not something I have specifically 
considered - it it possible to write non-reentrant C code? (As distinct 
from thread safe.)


I think your JNI program probably has to do the work of loading the 
assembler program itself for each call.


OR

Is it possible to recreate the assembler program functionality in Java? 
That is definitely more maintainable than JNI + Assembler, and might be 
easier - depending on the function.


--
Andrew Rowley
Black Hill Software

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


Re: Are JNI required to be re-entrant and/or re-usable?

2023-02-15 Thread Andrew Rowley

On 16/02/2023 6:40 am, Steve Smith wrote:

If you're confused, it's probable that you didn't read all his words.


The OP did say that the assembler module is *known* to be not reusable 
i.e. each call needs a new copy.


Speculation about *maybe* it's not reusable and whether that was 
intended seems to be confused.


--
Andrew Rowley
Black Hill Software

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


Re: How to get MetalC "INLINE" report

2023-02-10 Thread Andrew Rowley

On 11/02/2023 7:42 am, Farley, Peter wrote:

I'd consider this to be a bug in the compiler. The listing pmap should show all 
source statements, at the place where they are executed. If they are inlined 
twice, they should be listed twice.


That sounds like it would ultimately be confusing. An inlined piece of 
code might be inlined in hundreds of places.


In general, my expectation of optimization is that it happens behind the 
scenes and doesn't change visible behavior. A huge growth in the 
compiler listing is probably not what people want.


Also, once a piece of code is inlined, other optimizations are opened to 
the compiler.


- The compiler might know some input parameters, so parts of the code 
are redundant and can be removed, loops can be unrolled etc.


- Statements can be reordered - parts of the inlined code might be moved 
outside loops in the calling code


- The compiler might even swap the order of inner/outer loops, so that 
part of the calling code ends up inside a loop in the inlined section of 
code


These would be very difficult to reflect in a compiler listing (and are 
the reasons debugging optimized code is problematic).


--
Andrew Rowley
Black Hill Software

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


Re: Transmitting SMF records

2023-01-25 Thread Andrew Rowley

On 26/01/2023 10:40 am, Kirk Wolf wrote:

ISTR that distributed SAS has an option to read binary byte stream files with 
BDW+RDWs, which is what you would get if the program were to produce a merged 
RECFM=U DCB.


It does, but I can't see any reason to implement that other than to 
workaround IBM's broken FTP. It's easier to read data in record format 
with RDWs.


IBM FTP will do the right thing if you specify the SITE RDW option - I 
assume that the SAS RECFM U support was added before that was available.


EasySMF will automatically recognize RECFM=U, RECFM=V or TSO TRANSMIT 
format data, optionally in a gzip or zip file, and process it correctly. 
It will also recognize SMF data with no RDW and tell you what is wrong.


--
Andrew Rowley
Black Hill Software

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


Re: Transmitting SMF records

2023-01-25 Thread Andrew Rowley

On 26/01/2023 10:20 am, Paul Gilmartin wrote:
It's possibly catering to the novice user rather than the journeyman. 


Unfortunately I don't think that's the case. When transferring variable 
length binary records, the default options give you unusable (I would 
call it corrupted) data. You need to delve into the details of record 
formats and RDWs to understand why.


If using the data requires deblocking variable records from RECFM U 
blocks it's not for the novice user. More likely, the people writing FTP 
didn't properly understand the requirements for variable length records. 
You need the RDW.


--
Andrew Rowley
Black Hill Software

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


Re: Transmitting SMF records

2023-01-25 Thread Andrew Rowley

On 26/01/2023 7:24 am, Andrew N Wilt wrote:


The GDKUTIL utility does allow an Upload of something with RECFM=U. 
This was done at the behest of a customer that was using ftp to put SMF data 
out for processing by the SAS tool. Apparently, they are able to decipher the 
RDW records resulting from uploading a RECFM=VBS as a RECFM=U.


I would be slightly surprised if SAS can't read VB records properly 
formatted with the RDW. RECFM U was a workaround for the problem where 
FTP stripped out the RDW. So GDKUTIL seems to be reproducing the 
brokenness of FTP, then providing the same workaround as a feature.


It would be preferable if it retained the RDW in VB records by default. 
GDKUTIL seems new enough that the default could be changed without too 
much impact. I doubt there is anyone using variable length binary 
transfers currently who needs the data without the RDW. (However there 
might be people uploading data who haven't discovered the resulting data 
is unusable.)


I have been working with SMF data myself for many years, and this 
problem with FTP causes a LOT of customer confusion and frustration.


--
Andrew Rowley
Black Hill Software

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


Re: Transmitting SMF records

2023-01-23 Thread Andrew Rowley

On 20/01/2023 7:07 am, Glenn Wilcock wrote:

Late to the party on this discussion... DFSMS recently shipped a new utility 
named GDKUTIL.  It converts z/OS data sets and UNIX files to cloud objects and 
visa-versa.


Reading the documentation, the following note looks like a problem:

=

/When specifying a z/OS Data Set for LOCAL or LOCNAME for a DOWNLOAD 
command without the CONVERT keyword, the Record Format should not be 
Variable. (RECFM=V or RECFM=VB) This is because in binary mode, there 
are no indicators in the data where a record ends, so the data is placed 
up to the maximum logical record length. If a Data Set with variable 
records was uploaded to a Cloud Object in binary mode, the indicators of 
where a record begins and ends are lost. Therefore, a download operation 
of that same data to a Variable record data set cannot tell when to 
start a new record in the data set./


=

A useful function should be able to round trip the data to and from 
cloud storage and end up with exactly what you started with.


If there is not enough information to recreate the records on z/OS with 
the correct length, there is probably not enough information to usefully 
process the data on another platform. FTP made the same mistake, 
assuming that the record length information was not part of the data. 
For variable length records it is critical.


RECFM U presumably preserves the block & record length information, but 
makes it unnecessarily complex to decipher. From the documentation I 
can't tell whether uploading RECFM U data results in the same data you 
started with. At a minimum there must be complications to end up with 
the real/correct DCB attributes.


--
Andrew Rowley
Black Hill Software

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


Re: Transmitting SMF records

2022-12-16 Thread Andrew Rowley

On 16/12/2022 11:33 pm, Scott Chapman wrote:


We have customers (S)FTP(S)ing us data every day directly referencing the 
output of IFASMFDP with DCB=RECFM=U with no problem.


The OP specified being able to reverse the process, so my understanding 
was it needed to transfer back to a dataset on z/OS.


This seems to be surprisingly difficult - IBM doesn't seem to have 
considered round trip capability when they wrote the FTP functions. 
(Although I haven't tried it with a RECFM U transfer.)


--
Andrew Rowley
Black Hill Software

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


Re: Transmitting SMF records

2022-12-15 Thread Andrew Rowley

On 16/12/2022 1:43 am, Gary Weinhold wrote:

As an alternative, it wouldn't seem very difficult to create a utility to read 
the FTPed data (received as a sequential file with an arbitrary record length) 
and reformat the data to write a VB(S) file.


It is not difficult. The biggest problem is that by default FTP strips 
the RDW, which makes variable length binary data unusable. The solution 
to that problem is to use the SITE RDW option for the download.


I wrote a Java program to read/write z/OS data in GZIP format to get 
around the various problems.


You can:

- gzip VB(S) into a FB dataset on z/OS, download the data and unzip on a PC

- download VB(S) data using BINARY and SITE RDW options, gzip the data 
on the PC, upload to a FB dataset then uncompress to a VB(S) dataset.


The program is available here:

https://github.com/BlackHillSoftware/z-java/tree/master/java/compress

--
Andrew Rowley
Black Hill Software

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


Re: Capture 3270 screen as text (was: TNZ 3270 Emulator: ... )

2022-11-20 Thread Andrew Rowley

On 21/11/2022 3:52 am, Paul Gilmartin wrote:


That's likely not to work because lines might be separated and indented not by 
CRLF
and leading spaces but by cursor addressing commands which are not meaningful
when pasted into a text document.


By the time the screen is displayed the 3270 commands are likely 
replaced by spaces in a fixed width font so copying text shouldn't be a 
problem.


Vista does this very well. I don't remember any issues using PCOM 
either. It's more complicated if you want to keep the colors, and I 
don't recall an emulator that does that.


Pasting is more complicated in that there are areas you can't write to. 
That's more a design issue though - how you handle multiple lines, do 
you wrap etc.


--
Andrew Rowley
Black Hill Software

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


Re: TNZ 3270 Emulator: Any Experiences?

2022-11-20 Thread Andrew Rowley

On 19/11/2022 8:19 pm, Peter Sylvester wrote:

It seems to me that this code currently poses a security risk.

Certificate validation always say OK. (well it is said like this in 
the code.)



Which terminal emulators actually validate the certificate?

I would like to think all of them do, but the number of TLS tutorials 
that start by creating your own CA suggests that certificate validation 
might not be common.


I don't think Vista does it :-(

I assume that TLS is set up before any TN3270 specific stuff happens so 
you can probably test it by connecting to e.g. wrong.host.badssl.com 
port 443. A certificate error would show that the certificate is being 
validated.


--
Andrew Rowley
Black Hill Software

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


Re: Dcollect to Splunk

2022-11-09 Thread Andrew Rowley

On 10/11/2022 8:27 am, James Cradesh wrote:

Is it possible and any vendors supporting it?  Would like to get rid of SAS.



It's not a released feature yet, but EasySMF:JE can convert Dcollect 
records to JSON for reporting with e.g. Splunk. Contact me direct if you 
would like to try it out.


--
Andrew Rowley
Black Hill Software

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


Re: ftp to/from USS with Windows

2022-10-25 Thread Andrew Rowley

On 26/10/2022 8:47 am, Steve Thompson wrote:

So this is what I want to do:

[already set to the correct location in windows]

get '/u/abc/some.java.file.jar' some.java.file.jar

Try without the quotes? I think the quotes might indicate a dataset 
rather than HFS file.


--
Andrew Rowley
Black Hill Software

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


Re: Enterprise Cobol 6.3.0, XML PARSE and zIIP usage.

2022-09-30 Thread Andrew Rowley

On 30/09/2022 7:24 pm, Massimo Biancucci wrote:

After increasing the size of XML up to 150MB then I saw a little of zIIP
usage.
Anyway, it would be interesting to know how IBM manages these thresholds.
Interesting question. It might be as simple as whether the program is 
processing XML when it is interrupted and redispatched.


The likelihood of being interrupted in XML code probably corresponds to 
the proportion of time spent processing XML, so dispatching on the zIIP 
would probably give you roughly the right amount of zIIP time even if 
you have some leakage of XML/non-XML code between zIIP and CP.


--
Andrew Rowley
Black Hill Software

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


  1   2   3   4   5   >