You could consider this another in the Small Programming Enhancement (SPE) series.
You’ll probably also notice I’ve been doing quite a lot of REXX programming recently.
Anyway, here’s a tip for refactoring code I like. Suppose you have a line of code: norm_squared=(i-j)*(i-j)
that you want to turn into a function. No biggie: norm2: procedure
parse arg x,y
return... [More]
Tags: 
rexx
|
I've talked about BPXWUNIX before but here's a nice use case: Filtering REXX query results. When I get your performance data I have code that stores it in a database which I query with (essentially) REXX.
The predicate syntax is very simplistic so I'd like to do better.
I can't replace the syntax (not entirely true but close enough) but I can filter the results better. Consider the following... [More]
Tags: 
bpxwunix
unix
grep
rexx
cut
uss
|
This is the second part of a (currently) three-part series on processing XML data with DFSORT, given a little help from standard XML processing tools. The first part - which you should read before reading on - is here . To recap, getting XML data into DFSORT is a two stage process: Flatten the XML data so that it consists of records with fields in sensible places. Process this flattened data with... [More]
Tags: 
xml
xslt
saxon
rexx
csv
dfsort
xpath
|
In REXX sorting is a fraught exercise - and you tend to have to resort to other programs to do it: DFSORT for the “heavy lifting” UNIX Sort but you might decide your sort is low volume enough to do in REXX.
The trouble is it’s difficult to write a routine that isn’t specific on how the data is sorted,
or rather how two items are compared - as we shall see. Following on... [More]
Tags: 
rexx
sorting
|
A couple of days ago I had a need to take a REXX string comprising space-separated numbers and find their minimum and maximum values. Here's the technique I used. (When I say "space-separated" there can be one or more spaces between the numbers, but there has to be at least one.) The solution has three components: The REXX SPACE function - to turn the list into a comma-separated string of... [More]
Tags: 
rexx
|
I like REXX but sometimes it leaves a little to be desired. This post is about a technique for dealing with some of the issues. I present it in the hope some of you will find it worth building on, or using directly. Note: I’m talking about Classic REXX and not Open Object REXX . List Comprehensions are widespread in modern programming languages - because they express concisely otherwise... [More]
Tags: 
rexx
|
I have REXX code that can be called directly by TSO (in DD SYSTSIN data) or else by another REXX function. I want it to behave differently in each case: If called directly from TSO I want it to print something. If called from another function I want it to return some values to the calling function. So I thought about how to do this. The answer’s quite simple: Use the parse source command and... [More]
Tags: 
interpret
source
rexx
tso
parse
|
If you’re running a workload with WLM Percentile Response Time goals
take a look at the RMF Service Class Period Response Time Goal Attainment instrumentation.
It’s in the Workload Activity Report but this post is about using the raw data to tell the
story better than a single snapshot (or long-term “munging”) can. (An example of a percentile response time goal is “90% of transactions must end... [More]
Tags: 
workload_activity
wlm
smf
rmf
transaction
percentile
goal
rexx
response_time
gddm
smf72-3
|
First, I’m indebted to Ray Mullins for his help in figuring out how to solve the problems I identified as remaining in Alternate Macro Libraries: A Way To Document Assembler Tables .
Indeed he wrote a very handy blog post of his own:
Wrapping your own macro code around vendor-supplied macros without changing source
This post, to summarise, shows how you can use the OPSYN instruction to create... [More]
Tags: 
macro
sed
html
dfsort
rexx
hlasm
assembler
outfil
|
To me learning is like Microwave Popcorn . Specifically, turning into Part of the fun of making popcorn is watching the bag and listening to the poppings: As each kernel pops it pushes the bag out. And so it is with learning: Every piece of knowledge contributes to the overall shape. Anyhow, enough of the homespun "philosophy". I was maintaining some ISPF REXX code recently and it caused me to... [More]
Tags: 
rexx
ispf
|
You'd think it would be pretty simple to draw a line. Right? This post discusses an enhancement I'd like to make to my current reporting - and I'm pretty sure that technically I can do it. The question is whether I should . Consider my current "Memory by address space within Service Class" graph. Here's a sample: And here's what I think I might like it to look like: Obviously the line's... [More]
Tags: 
rexx
excp
memory
cics
smf
interval
mxg
gddm
smf30
rmf
slr
cpu
db2
smf72-3
smf72
|
JVM-based languages have an interesting property for z/OS programmers: They are zAAP-eligible. As we all know zAAP Eligibility brings a number of benefits - including the licence charge benefits and the ability to run on a full-speed processor even when your general-purpose processors are subcapacity ones. (I'll briefly mention zAAP-on-zIIP here for completeness, and then move on.) You... [More]
Tags: 
unix
bpxwunix
sed
z/os
netrexx
ruby
classpath
javascript
rhino
jruby
jython
javac
jvm
mainframe
zseries
rexx
java
python
systemz
modernisation
zaap-on-ziip
|
As I said in this post I recently came across the need to handle Unicode when processing DB2 Accounting Trace (SMF 101). I was astonished not to have run into it before in all my many sets of customer data. So I had two things to do: Understand the circumstances under which it happens - which isn't just "be on Version 8 and it will happen automatically." and Figure out how to handle... [More]
Tags: 
zparm
ifcid239
uifcids
assember
smf101
ascii
unicode
sdsnmacs
translate
rexx
tr
catalog
smf
ebcdic
db2
dsnzparm
|
I don't know how many years it's been since DB2 Version 8 was shipped but I've FINALLY added support for some really useful statistics that became available with that release. As so often happens I was caused to open up my code because of some customer data that exposed a problem in it: The customer sent DB2 Version 8 SMF 101 Accounting Trace data that contained Unicode. In particular DB2... [More]
Tags: 
batch
accounting
unicode
rexx
smf
smf101
db2
performance
package
|
The very first computer game I ever played was called Rhino and it ran on a Commodore PET. The school had been lent one for a fortnight. (I don't know why as we didn't go on to buy any, instead getting a single RML 380Z.) Imagine a character-grid screen where the rhino's are represented by pi symbols that chase you as you try to move from A to B. It was written in BASIC and allowed from 1 to 10... [More]
Tags: 
zaap
zaap-on-ziip
unix
dojo
rexx
rhino
e4x
java
z/os
xml
spidermonkey
pet
javascript
bxwunix
jquery
ziip
uncharted3
commodore
|
I've written about Hackday in the past. See My HackDay 6 Project - Mashing Up RMF , My HackDay 5 Project - z/OS System Logger Analysis and Hackday4 and Referer URLs (though I don't know why I didn't write about Hackday 7 or Hackday 8). So, this year I participated in Hackday 9 (last Friday). My entry follows on from this recent blog post: BPXWUNIX - z/OS' Best Kept Secret? . Graham Harris, in... [More]
Tags: 
xalan
hackday
xpath
rexx
java
z/os
hackday9
bpxwunix
rmf
xml
|
Maybe you've all heard of BPXWUNIX. Maybe it's just me that hasn't. Hence the question mark in the title. Seriously, I doubt this REXX function is as widely known about as it should be. And this post hopes to illustrate a little of its value. Suppose you're writing a REXX program with a stem variable in it. Suppose you want to sort the strings in the stem variable: You might write your own... [More]
Tags: 
bpxwunix
stdin
vb
sort
dfsort
z/os_unix
vbs
stdout
z/os
stderr
smf
rexx
|
Over the weekend I decided to try my hand at writing a JSON parser in REXX. I developed the technique outlined in this post to enable me to do that. I think it's new. Certainly I've not seen it before. (I don't want at this point to get into a discussion about why JSON parsing might be a useful thing to do. Suffice it to say it is possibly going to be second only to XML as a common data format in... [More]
Tags: 
json
schema
programming
interpret
parsing
xml
procedure
rexx
|
It may surprise you to know I hate asking questions to which I already know the answers. And I hate even more "leaving understanding on the table". Let me put it more positively: I love it when I can glean new insights into existing data. This post is about precisely that: An experiment in gleaning extra understanding... In Batch Architecture, Part Zero and follow-on posts I talked... [More]
Tags: 
smf30
regular_expressions
smf
z/os
architecture
job
batch
rexx
|