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:


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.


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.

“Products related to this item” ?

May 26, 2019 Incoherent ramblings No comments , , ,

I’m looking for belt lube to cure the “E2 lube belt” error on my Tempo 632T model treadmill.  Amazon has some strange ideas about related items

Thoughts about Ayn Rand’s Anthem

May 26, 2019 Uncategorized No comments , , ,

Many libertarian podcasts talk about Ayn Rand positively, sometimes even lovingly.  On the other hand, Rand seems to invoke the worst venom and hate from some on the left.

I found the book Anthem, by Rand, at the local recycling depot, which has a community take a book, leave a book bookshelf.  That presented an opportunity to see for my self what the Rand fuss was about.

It turned out that Anthem is a really tiny book, more of a pamphlet than a book.  The copy that I now have is a two in one, with the 2nd edition at the front half of the book, and Rand’s marked up version of her first edition at the back.

The book has a very 1984 like spirit, set in a dystopian alternate (presumed future) reality, where collectivism has been taken to the extreme.  Sexual distinctions have been eliminated, men and women aren’t allowed to be attracted to each other, outside of a proscribed annual mating ritual, kids are taken away from parents at an early age and raised by the state, and most of the knowledge of the past has been obliterated.

An amusing aspect of the book is that gender specific pronouns have been eliminated, as have all personal pronouns.  This is amusing given the current trend towards exactly that in our modern time, where there is an annoying trend to use words like “they” used instead of he/she.  I found “they” for he or she annoying because I happen to think there is value distinguishing between singular and plural.

The focus of the book is to highlight the evil of collectivism.  It’s therefore no surprise why Rand is hated so thoroughly by the left.  There wasn’t much more in this book that I’d imagine would be objectionable, other than the fact that it shows what communism might look like in the extreme.  That might make it unappealing to those that insist “communism works in theory” despite the fact that communism obliterated millions of their own people last century.

There is bit of a revolutionary bent to the story as well.  At the end, once our protagonist has discovered himself, he plans to educate a selection of potential compatriots and establish a little cell against the system.

As I read this book, I realized a little bit in that I’d read it already eons ago. I’m wondering if I read this in some sort of dystopian or sci-fi collection.  I think that I read it without any idea of who Ayn Rand was, so in retrospect, I didn’t even know that I’d read anything by her.

I enjoyed the discovery aspect of this book. There’s been many a sci-fi book that I’ve read that had a dystopian context where the characters are in the situation of having to rediscover the mysteries of the previous civilization. It’s fun to imagine oneself in such a context, knowing how much there is to learn, and the idea of being able to share everything that you discover.

“2nd” edition of “Geometric Algebra for Electrical Engineers”

May 4, 2019 Geometric Algebra for Electrical Engineers No comments

I’ve refreshed my Geometric Algebra for Electrical Engineers book, which could be considered a 2nd edition of sorts. The amazon color and black-and-white versions have been updated, as well as the pdf and the leanpub version (all of those are in available in the previous link.)


V0.1.15-6 (May 2, 2019)

  • Update figures (thicker lines, remove some ticks, …) and link them to the mathematica link anchors.
  • “in figure fig.” -> “in fig”.
  • Extend my hacks of the classic thesis template to use 6×9 with smaller than default margins. Now have the preface page numbers not in the bleed area of the page.
  • Split colorlablebox into separate .sty (for phy452 notes.)
  • Fix pdfbookmarks for contents and list of figures (so that they don’t show up under the preface)
  • Index quaternion (Bruce Gould)
  • GAelectrodynamics.tex: Want scrheadings starting before contents otherwise page numbers are out of bounds (and the page headings are MIA)
  • Bruce: “May I suggest that the proofs should have the end-of-proof symbol at the end?” Used the amsthm proof environment to do this.
  • Theorem 1.2: turn the converse into a footnote, to be seen later. (Bruce)
  • Added Bruce Gould to the thanks.


Notes for Quantum Field Theory I (phy2403) now available in paper on amazon

May 2, 2019 phy2403 No comments , ,

My notes (423 pages, 6″x9″) from the fall 2018 session of the University of Toronto Quantum Field Theory I course (PHY2403), taught by Prof. Erich Poppitz, are now available on (through kindle-direct-publishing, formerly createspace).

These notes are available in three forms, two free, and one paper:

  • On amazon (kindle-direct-publishing) for $11 USD,
  • As a free PDF,
  • As latex sources (, makefiles, figures, …) to build/modify yourself.

This book is dedicated to dad.

Warning to students

These notes are no longer redacted and include whatever portions of the problem set 1-4 solutions 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.


The official course outline included:

  1. Introduction: Energy and distance scales; units and conventions. Uncertainty relations in the relativistic domain and the need for multiple particle description.
  2. Canonical quantization. Free scalar field theory.
  3. Symmetries and conservation laws.
  4. Interacting fields: Feynman diagrams and the S matrix; decay widths and phase space.
  5. Spin 1/2 fields: Spinor representations, Dirac and Weyl spinors, Dirac equation. Quantizing fermi fields and statistics.
  6. Vector fields and Quantum electrodynamics.



Advanced Classical Optics: notes now available on amazon

April 17, 2019 math and physics play No comments , , ,

My notes (382 pages, 6″x9″) from the fall 2012 session of the University of Toronto Advanced Classical Optics course (PHY485H1F), taught by Prof. Joseph H. Thywissen, which I took as a non-degree student, are now available on (through kindle-direct-publishing, formerly createspace).

These notes are available in three forms, two free, and one paper:

  • On amazon (kindle-direct-publishing) for $11 USD,
  • As a free PDF,
  • As latex sources (, makefiles, figures, …) to build/modify yourself.

The official course description at the time was:

This course builds on a student’s knowledge of basic electromagnetic theory by focusing attention on light including elementary aspects of the propagation of optical beams and their interaction with matter. We examine light polarization, coherence, interference and diffraction as we move towards a description of lasers within a semiclassical picture in which the fields are treated classically and matter is treated quantum mechanically. In between we discuss Gaussian beam modes and their relation to optical resonators as well as fibre and slab waveguides

This bookish collection of notes is dedicated to my mom.