ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

Scan/Replace the character in the member


Article ID: 223915


Updated On:




Is there a way to Scan/Replace the charactor in the member?




The following is a sample JCL.

Sample JCL:


//        JOB
//PANDD1   DD DSN=User.panvlt.panlib,DISP=SHR
//SYSIN    DD *
++SCAN aaaaaaaa,'bbbbbbbb'

aaaaaaaa :member, 'wildcardname', *language type
This required parameter specifies the segment of the library you want to search.
You can specify a member name to limit the scan to a single member.
You can specify a set of member names by using wildcard character notation in your member name.
You must enclose the member name in quotes to activate the wildcard selection feature.
For performance reasons, do not enclose a member name in quotes if you do not want a wildcard search.
You can scan all members of the same language type by specifying the language type (you must include the prefix *).
You can search the entire library of members by specifying an * as the first parameter.

bbbbbbbb :'scan field'
This optional parameter represents a character string in a beginning and ending delimiter used as an argument for searching members for an exact match.
The scan field can be any length from 1 to 61, exclusive of the delimiter characters.
You can use any delimiting character as long as it is not contained within the character string.
If you omit this parameter, it is assumed that subsequent REP commands specify both a search argument and a replacement string.
If you use a REP command, you cannot put a scan field on the SCAN statement.


//        JOB
//PANDD1   DD DSN=User.panvlt.panlib,DISP=SHR
//SYSIN    DD *
++SCAN *language type
++REP /cccccccc/dddddddd/

These optional parameters represent two character strings with beginning and ending delimiters used as an argument for searching library members for an exact match and replacement.
The combined length of the two fields must not exceed 63 characters, exclusive of delimiter characters.
They must be short enough to fit in SCAN column delimiters (if specified) or in the default column delimiters for the language type being processed.
You can use any delimiting character as long as it is not contained in either character string.

cccccccc :/scan field/
When you leave out the replace field, the scan field is simply deleted whenever it is found, and all data to the right (within the columns specified on the SCAN command) is shifted left.

dddddddd :/replace field/
When you leave out the scan field, the replace field is inserted at the beginning column specified either by the preceding SCAN command or by the default beginning column for the language being processed.

For more information, see the SCAN Command and REP Command of System Management document.