I have a little routine for the operation staff to display guests and part of 
the code looks like this.  Forgive the use of JOBNME as a variable, I'm also a 
z/OS sysprog.

'pipe cp query names',
'| split ,',
'| strip',
'| pad 18',
'| locate *-8 /'JOBNME'/',
'| sort 1.8 ascending',
'| join 3',
'| console'


Paul Feller
AIT Mainframe Technical Support

________________________________
From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] On Behalf Of 
Martin, Terry R. (CMS/CTR) (CTR)
Sent: Friday, October 10, 2008 1:15 PM
To: [email protected]
Subject: PIPES

Hi

In the pipe command below where GUEST is the name of a Linux that I PULLED from 
a previous SAY. I want to use GUEST in the LOCATE can I do this and if so is 
the syntax correct? I have tried this but it does not work unless I put a 
specific Linux name in the LOCATE. This is just a test EXEC while I get a feel 
for all of this.

SAY 'LINUX GUEST ID'
PULL GUEST

'PIPE CP Q NAMES | LOCATE /GUEST/ | SPLIT | LOCATE /GUEST/',
'| > LINUX USERS A'

          USERID = 'LINUX USERS A'
     PARSE VALUE STREAM(USERID,'C','OPEN READ') WITH OK FILE_HANDLE

    IF OK /= 'READY:' THEN
DO
  SAY 'NO LINUX USERS LOGGED ON'
END

   'CP I CMS'
  EXIT          /* RETURN TO CMS */

Thank You,

Terry Martin
Lockheed Martin - Information Technology
z/OS & z/VM Systems - Performance and Tuning
Cell - 443 632-4191
Work - 410 786-0386
[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>

Reply via email to