Thankfully, you can do both on z/OS at the same time :-)

// EXEC PGM=COZBATCH  (A better BPXBATCH)
//SYSUT1  DD DISP=SHR,DSN=HLQ.MY.DATA
//STDOUT  DD SYSOUT=*
//STDIN   DD *
# This is just a z/OS UNIX login shell in batch...
fromdsn //DD:SYSUT1 | grep ^ted013: | awk -F':' '{print $3}'
//

COZBATCH is available free under our Community license.
See:  http://dovetail.com/products/cozbatch.html

Kirk Wolf
Dovetailed Technologies
http://dovetail.com


On Thu, Feb 4, 2016 at 2:00 PM, Tom Brennan <t...@tombrennansoftware.com>
wrote:

> That's great stuff, and how mainframe methods need to be taught today.
> College students understand unix and windows, and need to know the (can I
> say odd?) differences they will see on the mainframe, along with a bit of
> history.
>
> I'm currently trying to write up some notes for some (possible) new
> mainframers who already know unix, and this is one of my comparisons:
>
> Unix Style:
>
> cat /etc/passwd | grep ^ted013: | awk -F':' '{print $3}'
>
> JCL Style:
>
> //CAT      EXEC PGM=CAT
> //SYSUT1   DD   DSN=SYS1.ETC.PASSWD,DISP=SHR
> //SYSUT2   DD   DSN=&TEMP1,DISP=(NEW,PASS),SPACE=(CYL,(1,1))
> //*
> //GREP     EXEC PGM=GREP
> //SYSUT1   DD   DSN=&TEMP1,DISP=(OLD,DELETE)
> //SYSUT2   DD   DSN=&TEMP2,DISP=(NEW,PASS),SPACE=(CYL,(1,1))
> //SYSIN    DD   *
>  ^ted013:
> /*
> //AWK      EXEC PGM=AWK
> //SYSUT1   DD   DSN=&TEMP2,DISP=(OLD,DELETE)
> //SYSUT2   DD   SYSOUT=*
> //SYSIN    DD   *
>  awk -F':' '{print $3}'
> /*
>
> Of course we don't normally have MVS programs named CAT/GREP/AWK but I'm
> hoping to show how we chain programs together using JCL, and relate that to
> unix commands that a student today already knows well.  Then I just have to
> try and explain why it takes 16 lines of JCL to do the same thing as one
> line in unix :)
>
> Ed Gould wrote:
>
>> http://destinationz.org/Mainframe-Solution/Trends/What-the-Heck-Is-
>> JCL-and-Why-Does-It-Look-So-Funny
>>
>>
>> What the Heck Is JCL and Why Does It Look So Funny?
>> It’s important to give job control language its due respect helping
>> others
>> - See more at: http://destinationz.org/Mainframe-Solution/Trends/What-
>> the-Heck-Is-JCL-and-Why-Does-It-Look-So-Funny#sthash.TRwMFSIg.dpuf
>>
>>
>> ----------------------------------------------------------------------
>> For IBM-MAIN subscribe / signoff / archive access instructions,
>> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>>
>>
>>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to