Exclude member that contain specific character in GPO processing

book

Article ID: 211340

calendar_today

Updated On:

Products

CA Librarian

Issue/Introduction

How to exclude members that contain specific characters when copying members from the master file to PDS.

Environment

Release : ALL

Resolution

Add the symbol(x'5F') meaning Logical NOT(Not equal) to NAME= in GPO processing.

Sample:

Exclude members containing @, # and $.

//STEP01  EXEC PGM=AFOLIBR,PARM='NRJS,NJTA'
//STEPLIB  DD DISP=SHR,DSN=LIBR.R44SP00.CALJLINK
//SYSPRINT DD SYSOUT=*
//MASTER   DD DSN=TEST.LIBR.MASTER,DISP=SHR
//OSJOB    DD DSN=TEST.LIBR.SYSIN,DISP=(NEW,CATLG),
//            UNIT=SYSDA,SPACE=(TRK,(5,5),RLSE),VOL=SER=WORK01
//SYSIN    DD *
-OPT GPO
-SEL NAME=/@,S/&NAME=/#,S/&NAME=/$,S/
-END
/*
//


The GPO facility uses the Boolean logical operators AND (& or ,), OR (|), and NOT (¬) to determine selection criteria. The operators function as follows:

*Ampersand (&) or comma (,)
 Instructs CA Librarian to locate members where both the preceding and following criterion expressions are true.(The ampersand and comma are functionally equivalent.)
*Vertical bar (|)
 Instructs CA Librarian to locate members where either the preceding criterion expression or the following expression, or both, are true.
*Logical NOT (¬)
 Instructs CA Librarian to negate the sense of the expression that follows. The logical NOT, used in front of an expression enclosed in parentheses, negates the entire expression.

NAME=/string[,S|,n]/
Selects all members that have names containing the specified search string. If you supply a string only, the match starts at the beginning of the member name. If you specify an S, the string can appear anywhere in the member name. If you specify a numeric value, the matching occurrence of the search string must be displaced n characters into the member name.
Search strings can be up to eight characters long. However, if specifying a displacement, the displacement plus the length of the string cannot exceed eight.

Refer the GPO Control Statement Syntax.