Master the Mainframe and Python

Well as I expected being able to edit my z/OS mainframe programs with VS Code makes things much easier. Don’t get me wrong doing it the traditional harder way on a 3270 screen is good to know. When I was punching cards, I would have killed for ISPF on a 3270. Anyhoo…

I didn’t want to manually type a similar set of many lines into REXX. My goal is to create a REXX, 2 dimensional table, so I’m generating many (400+) lines of REXX code from Python. Being able to paste these lines into my REXX program is a huge help. Add to the fact that there is still much about REXX syntax that I don’t know and you can see that pasting isn’t a one time thing. For example I needed to insert a long string into a variable. Not surprisingly I couldn’t do something like this

v=”1…….10……..20……..30……..40……..50……..60……..70…….80……..90…….100…….110…….120″

So I google and I read you need to continue lines with a comma. So I try…

v=”1…….10……..20……..30……..40……..50……..60 ,

……..70…….80……..90…….100…….110…….120″

Nope. How about…

v=”1…….10……..20……..30……..40……..50……..60″ ,

“……..70…….80……..90…….100…….110…….120”

Again…no! Followed by a few more tries. Until I see an example like this…

v=”1…….10……..20……..30……..40……..50……..60″ , ||
“……..70…….80……..90…….100…….110…….120”

In hindsight it makes sense. I’ve seen “||” used for concatenation before. So all these iterations required a change in my Python program followed by a rerun, followed by a paste/replace into my REXX code!

If I was better at REXX I could have generated REXX code with REXX. However the data was still coming from a web page in ASCII. So I still think Python was the better tool in this case!