How to validate the existence of a file on a Server via JCL

2010-05-21 Thread Hilario Garcia
I would like to know how to test the existence of a file on a Server Directory 
(Windows or Linux) and if exist to execute a job step in an z/os jcl.

Thanks in advance.

Hilario

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: How to validate the existence of a file on a Server via JCL

2010-05-21 Thread Roberto Halais
Using a Rexx script
1-From z/os to the server establish an FTP connection to the folder where
the file should be..
2-Do a directory list
3-Catch the output in Rexx
4-Parse the output and look for your file.
5- If found execute your job step.

At least that's how I would do it.
Regards,
Roberto


On 5/21/10, Hilario Garcia cucho...@gmail.com wrote:

 I would like to know how to test the existence of a file on a Server
 Directory
 (Windows or Linux) and if exist to execute a job step in an z/os jcl.

 Thanks in advance.

 Hilario

 --
 For IBM-MAIN subscribe / signoff / archive access instructions,
 send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
 Search the archives at http://bama.ua.edu/archives/ibm-main.html




-- 
It is no measure of health to be well adjusted to a profoundly sick
society. -Krishnamurti

I am as you, in you, for you. One as you in all, as all, forever. My call
is your call.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: How to validate the existence of a file on a Server via JCL

2010-05-21 Thread McKown, John
 -Original Message-
 From: IBM Mainframe Discussion List 
 [mailto:ibm-m...@bama.ua.edu] On Behalf Of Hilario Garcia
 Sent: Friday, May 21, 2010 3:41 AM
 To: IBM-MAIN@bama.ua.edu
 Subject: How to validate the existence of a file on a Server via JCL
 
 I would like to know how to test the existence of a file on a 
 Server Directory 
 (Windows or Linux) and if exist to execute a job step in an z/os jcl.
 
 Thanks in advance.
 
 Hilario

How are you accessing the Windows/Linux server? Is the Windows/Linux 
file/directory directly readable on z/OS using SMB or NFS? Or do you need to 
use something like ftp?

For FTP, run a step like:

//FTP03EXEC  PGM=FTP,REGION=6M,PARM='(EXIT'
//SYSPRINT DD  SYSOUT=*
//OUTPUT   DD  SYSOUT=*,DCB=BLKSIZE=133
//INPUTDD  *
server.name
user
password
ls file-name-to-test
/*
//EXISTS EXEC PGM=DOIT,COND=(0,NE,FTP03)
//... MORE JCL
//*

Now, if you're using SMB or NFS to directly read the server's data as it if 
were a local UNIX file, then it would be similar, but different.

//TESTIT EXEC PGM=BPXBATCH,
// PARM='ls file-to-test'
//STDOUT DD SYSOUT=*
//STDERR DD SYSOUT=*
//STDIN DD PATH='/dev/null',PATHOPTS=(ORDONLY)
//*
//EXISTS EXEC PGM=DOIT,COND=(0,NE,TESTIT)
//... MORE JCL
//*


--
John McKown 
Systems Engineer IV
IT

Administrative Services Group

HealthMarkets(r)

9151 Boulevard 26 * N. Richland Hills * TX 76010
(817) 255-3225 phone * (817)-961-6183 cell
john.mck...@healthmarkets.com * www.HealthMarkets.com

Confidentiality Notice: This e-mail message may contain confidential or 
proprietary information. If you are not the intended recipient, please contact 
the sender by reply e-mail and destroy all copies of the original message. 
HealthMarkets(r) is the brand name for products underwritten and issued by the 
insurance subsidiaries of HealthMarkets, Inc. -The Chesapeake Life Insurance 
Company(r), Mid-West National Life Insurance Company of TennesseeSM and The 
MEGA Life and Health Insurance Company.SM

 

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html