Skip to content

Yippee – In Which I Improve My Workflow With “cat”

December 20, 2018

yikes

I’ve been doing a lot of compile/link/test sequences with wiringMVS.  The workflow consists of:

  • editing the C program along with its JCL and submitting it to MVS from textpad
  • switching over to putty and watching the MVS console to guess whether the compile worked based on: how long it runs, number of lines produced etc.
  • if i think it failed switching to winscp and reloading the printer output screen
  • switching to textpad again to bumble through multiple jobs output looking for error messages
  • rinse and repeat

I had the idea that if i could compile/assemble/link on windows it would be more interactive.  GCCMVS runs well enough and i can get the C errors out of the way but copying the assembler output into a job stream and submitting that is a bit painful and then i’m guessing again because sometimes i’ll get assembler errors and missing functions can show up in the link step.  I’ve been pursuing the Z390 assembler as an alternative but i’m not there yet.

In the meantime i had a bit of a brainstorm.  I set up a Hercules printer as a pipe to “cat”.  An MVS job sends output to the printer, hercules pipes it to “cat”, and cat sends it back to its stdout which Hercules displays on the console.  Bingo – instant interactive output!

I haven’t done it yet but it should be easy to direct the assembler and lked diagnostic steps to the same “printer”. I could even allocate it to JES2 and establish a “print to console” class!

I also added a couple of crude notification job steps at the end: YIKESC runs only if the compiler step fails and sends a message to the console, and YIPPEE runs only if all steps succeed and again sends a message. I sould clean them up with a stored PROC but the overall result is pretty gratifying.

//GPIOMULE JOB CLASS=A,MSGCLASS=A,REGION=4096K,
// MSGLEVEL=(1,1),
// USER=HERC01,PASSWORD=CUL8TR
//S1 EXEC GCCCLF,COS1='-S',
// PARM.ASM='DECK,NOLIST,TEST,TERM,NOXREF,NOMLOGIC,NORLD',
// PARM.LKED='TERM,TEST'
//COMP.INCLUDE DD DSN=HERC01.WIRINGMV.INCLUDE,DISP=SHR
//SYSIN DD *
pigs=undef(); //deliberate error
  ...
  ...
  rest of program
*/
//COMP.SYSPRINT DD DUMMY
//COMP.SYSTERM DD UNIT=30F
//LKED.SYSLMOD DD DSN=HERC01.LOAD(GPIO3),DISP=SHR
//YIPPEE EXEC PGM=IKJEFT01,PARM='SEND ''YIPPEE''',
// COND=((0,NE,S1.COMP),(0,NE,S1.ASM),(0,NE,S1.LKED))
//SYSPRINT DD DUMMY
//SYSOUT   DD DUMMY
//SYSTSPRT DD DUMMY
//SYSIN    DD DUMMY
//SYSTSIN  DD DUMMY
//YIKESC EXEC PGM=IKJEFT01,PARM='SEND ''YIKES THE COMPILER''',
// COND=((0,EQ,S1.COMP))
//SYSPRINT DD DUMMY
//SYSOUT   DD DUMMY
//SYSTSPRT DD DUMMY
//SYSIN    DD DUMMY
//SYSTSIN  DD DUMMY
Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: