Check out the fldata() function
http://publib.boulder.ibm.com/infocenter/zvm/v6r1/topic/com.ibm.zos.r9.cbcpx01/fldbeh.htm#fldbeh.
It gives you everything you need to know without having to parse file
name strings. If I were you I would stick to fixed dd names for batch jobs.
On 10/07/2013 11:27 AM, Ze'ev Atlas wrote:
Based on responses that I've got from previous two discussions, I've decided to
extend the existing PCREGREP [which is decidely written in C] and teach it to
deal with PDS and PDSE libraries. I need any bit of advice because I am not
too proficient in C.
What I intend to do is recognize that the file name is of the format
SOME.FILE.NAME(PATTERN) and designate that file as a PDS (this version of the
pcregrep utility would live only in the z/OS port. so I am not concerned about
other platforms having that as a valid file name. BTW, pattern wildcard in
that context is *, ?, whatever is accepted by fnmatch and valid member name
letters only, not a regular expression.)
Any other file name would be considered a flat file of sort.
I already know (conceptually) how to travel on a directory and get member names
one after the other, and I know (conceptually) how to match the member names to
the pattern and ignore aliases (or not.)
If I get a file name something like MLQ.LLQ(*) in the PARM= field, I should not
have any issue processing that.
I asked, but I am asking again, with regard to the fact that we are talking
about C, how would I pass quoted file names (i.e. with HLQ) in the PARM= field
of the JCL and how would C be able to decipher that.
If the pds name is provided as a DDNAME it would be like this this dd:ddname.
ZA
----------------------------------------------------------------------
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