Month: June 2019

Getting closer to a JCL one liner equivalent to Unix head -1.

June 14, 2019 Mainframe No comments , , , , , , , ,

I was somewhat bemused by how much JCL it took to do the equivalent of a couple ‘head -1’ commands.  It was pointed out to me that INDATASET, OUTDATASET can be used to eliminate all the DD lines, and that all but the SYSPRINT DDs for IDCAMS were not actually required.  This allows the JCL for these pair of ‘head -1’ commands to be shortened to:

The REPRO lines still have to be split up because of the annoying punch-card derived 72 column restrictions of JCL. Note that to use OUTDATASET in this way, I had to sacrifice the JCL shell variable expansion that I had been using. To retain my shell variables (SET TID=UT; SET CID=UT128) I still need DDNAME statements to do the shell expansion in JCL proper, since that doesn’t occur in the SYSIN specification.  Translated to Unix, we must think of this sort of SYSIN “file” as being single and not double quoted (unlike a Unix <<EOF…EOF inline file where shell script are expanded).  The JCL is left reduced to:

Note that since I opted to retain the DDNAME statements, the REPRO lines are now short enough to each fit on a single line.

It turns out that there’s also a way to do variable expansion within the SYSIN, essentially treating something like a Unix double quoted script variable.  You need to explicitly export the symbols in the JCL prologue using EXPORT SYMLIST, and then import them in the SYSIN specification using SYMBOLS=CNVTSYS

I’ve switched to IDS and ODS to make the lines shorter, which makes it possible for one of the REPRO lines to be a one liner (with 6 lines of helper code).  The final JCL line count weighs in at 8:2 vs. Unix, but is not as bad as the original JCL I constructed (22 lines.)

Book reflection: My Estonia, by Justin Petrone

June 13, 2019 Reviews No comments , , ,

My brother was tearing through this book when I saw him last, enjoying it thoroughly. It’s a book about the relationship of the author (Justin) with his Estonian girlfriend and eventually wife, as well as anecdotes about Estonia itself and some of the people encountered by Justin along the way.

My brother was amused by the characterization of Estonians as unfeeling and emotionless, and said that he saw aspects of that in Dad and himself. I don’t see that in him, nor in myself. I’m also not really sure how much of that characterization of Dad is due to Estonian heritage vs. having had a rather hard life as a refugee, having had an absentee father, and having that topped off with an abusive drunk of a stepfather. Dad left Estonia at age 2, so there was limited cultural exposure available to him. I’m inclined to believe that the emotionless aspect of Estonians portrayed in this book is more nurture than nature, so I’m not sure how much of Dad’s personality can really be ascribed to being Estonian.

Having grown up with blood sausage as a special treat at Vanaema’s* house, I really can’t understand how Justin can object to it. Who wouldn’t like bloodsausage – it’s so good!

I was amused that the Finns were aiming to take over the world one Sauna at a time. I wonder if the Sauna at Vanaema’s old house is still there? The Finns never took over that Sauna.

I don’t speak, nor understand Estonian.  I always imagined that it would make a super code language, and I love the sound of it.  We never spoke it in the house, with only one half of mom and dad knowing the language.  Dad was not terribly encouraging about the idea of learning the language, saying that it’s almost impossible for somebody to learn if they didn’t grow up with it.  It was encouraging to hear of Justin learning Estonian, so maybe there’s hope for me in the long run.

This was an amusing book, and I’d like to read the followup stories. I just hope that now that Justin is both married, has had his child, and has valid immigration papers, he manages to shelf his anxiety.

(*) Vanaema == grandmother, literally, old mother.

JCL equivalent of head -1.

June 12, 2019 Mainframe 1 comment , , , ,

Suppose you wanted to do the equivalent of the following Unix shell code on the mainframe in JCL:

head -1 < UT128.SYSOUT.EXPECTED > $TID.$CID.SYSOUT.ACT
head -1 < UT128.COBPRINT.EXPECTED > $TID.$CID.COBPRINT.ACT

Here’s the JCL equivalent of this pair of one-liners:

There are probably shorter ways to do this, but the naive way weighs in at 22:2 lines for JCL:Unix — damn!

I can’t help but to add a punny comment that knowing JCL must have once been really good JOB security.

Graduate Quantum Mechanics notes now available on paper from amazon

June 11, 2019 phy1520 No comments ,

My notes for “Graduate Quantum Mechanics” (PHY1520H) taught by Prof. Arun Paramekanti, fall 2015. (435 pages), are now available on paper (black and white) through kindle-direct-publishing for $12 USD.

This book is dedicated to my siblings.

Kindle-direct-publishing is a print on demand service, and allows me to make the notes available for pretty close to cost (in this case, about $6 printing cost, $5 to amazon, and about $1 to me as a token royalty).  The notes are still available for free in PDF form, and the latex sources are also available should somebody feel motivated enough to submit a merge request with corrections or enhancements.

This grad quantum course was especially fun.  When I took this class, I had enjoyed the chance to revisit the subject.  Of my three round match against QM, I came out much less bloody this time than the first two rounds.

These notes are no longer redacted and include whatever portions of the problem I completed, errors and all.  In the event that any of the problem sets are recycled for future iterations of the course, students who are taking the course (all mature grad students pursuing science for the love of it, not for grades) are expected to act responsibly, and produce their own solutions, within the constraints provided by the professor.

Changelog:

phy1520.V0.1.9-3 (June 10, 2019)

  • First version posted to kindle-direct successfully.
  • Lots of 6×9 formatting fixes made.
  • Add commas and periods to equations.
  • Remove blank lines that cause additional undesired indenting (implied latex \par’s).

Modern errata done right: a git merge request

June 7, 2019 Uncategorized No comments , ,

All the sources for my book, Geometric Algebra for Electrical Engineers, are available on github.  Theoretically, that means that instead of sending me an email when errors are found (and I’m sure there are many), you can simply fork the repo, fix the error to your satisfaction, and submit a merge request.  I didn’t expect that to actually happen, but it did:

Tim Put gets the credit for the first direct non-Peeter contribution to the GAelectrodynamics repository.