Paul,
The part I think you are missing is that cat and grep and awk are
system commands and as such are included in UNIX
Z/OS has no real equivalence (unless you are talking OE then that is
a whole separate discussion).
Please compare apple to apples. Not your wish list.
Ed
On Feb 4, 2016, at 4:08 PM, Paul Gilmartin wrote:
On Thu, 4 Feb 2016 15:30:53 -0600, Ed Gould wrote:
On Feb 4, 2016, at 2:00 PM, Tom Brennan wrote:
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}'
/*
unix :)-------------------------------------SNIP-----------------
To be fair to zOS There are "probably" the same files needed for UNIX
its just they are "assumed".
No, they are not; not even as RAM disk files. A pipe communicates
directly
between processes (like "tasks"). A DOS partisan once explained his
misunderstanding of pipes to me that way:
CAT reads /etc/passwd and writes to temporary file TEMP1.
When CAT terminates, GREP reads TEMP1 and writes TEMP2
When GREP terminates, AWK reads TEMP2 and writes to stdout.
Tom's JCL is actually:
cat /etc/passwd >temp1; grep ^ted013 <temp1 >temp2; awk -F':'
'{print $3}'; rm temp1 temp2
In Tom's UNIX example, the stages run concurrently. This can make
a big
difference if the first stage is long-running: you see output
before it terminates
(subject to some annoying buffer latency).
I could (and have) connected Classic OS programs with POSIX pipes
in Rexx.
That takes more than 16 lines. (You could omit the comments and
endfiles.)
I do see lack of temporary data sets as a design flaw of UNIX.
-- gil
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN