#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
#include <string.h>
int main( int argc, char **argv )
{
printf ( "%s\n", argv[1] );
return 0;
}
//SAMPLEJ JOB MUP,'JOB: SAMPLE',
// CLASS=A,
// MSGCLASS=X,
// NOTIFY=&SYSUID
//*
//*
//JS010 EXEC PGM=SAMPLE,PARM='/A.B.C'
//STEPLIB DD DSN=MUP.LOAD,DISP=SHR
//SYSPRINT DD SYSOUT=A
//*
//JS020 EXEC PGM=SAMPLE,PARM='/DD:DD1'
//STEPLIB DD DSN=MUP.LOAD,DISP=SHR
//SYSPRINT DD SYSOUT=A
//*
//JS030 EXEC PGM=SAMPLE,PARM='/A.B.C(X)'
//STEPLIB DD DSN=MUP.LOAD,DISP=SHR
//SYSPRINT DD SYSOUT=A
//*
//JS040 EXEC PGM=SAMPLE,PARM='/DD:DD2(X)'
//STEPLIB DD DSN=MUP.LOAD,DISP=SHR
//SYSPRINT DD SYSOUT=A
//
Output from above
A.B.C
DD:DD1
A.B.C(X)
DD:DD2(X)
On Tue, Jul 9, 2013 at 8:27 PM, Ze'ev Atlas <[email protected]> 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