Hi All,
I have gone thru the examples sited in this forum but I am encountering an issue while trying to replace multiple strings in a single record. I mean..
AAAAAAAAAAABBBBBBBBBBBBCCCCCCCCCC
Can anyone help me out in replacing A's with X and C's with Z thru fileaid batch procesing?
Any other approach is also fine....my motive is to replace multiple values in a PS file ... Please Dont suggest C ALL
Replace all but multiple times in a single record
Moderators: Anuj Dhawan, Moderator Group
-
- Member
- Posts: 3
- Joined: Thu Dec 20, 2012 11:03 pm
-
- Member
- Posts: 3
- Joined: Thu Dec 20, 2012 11:03 pm
-
- Member
- Posts: 3
- Joined: Thu Dec 20, 2012 11:03 pm
I tried it again...
Dd01 COPY EDITALL=(282,3,C'CA',C'PA')
DD01 COPY EDITALL={536,7,C'447911',C'421130')
In spool I see only firat statement got executed and returned input file already at EOD ...skipping DD01......any one help me out in dealing multiple replace in a single PS file on a single record
Dd01 COPY EDITALL=(282,3,C'CA',C'PA')
DD01 COPY EDITALL={536,7,C'447911',C'421130')
In spool I see only firat statement got executed and returned input file already at EOD ...skipping DD01......any one help me out in dealing multiple replace in a single PS file on a single record
$$dd01 COPYALL IN=0,
***
*** this will replace starting in column 1 for the length
*** of the entire input record
***
EDITALL=(1,0,C'A',C'X'), CHANGE ALL 'A' TO 'X'
EDITALL=(1,0,C'C',C'Z'), CHANGE ALL 'C' TO 'Z'
DUMP=10,OUT=0
note that you can include comments much like jcl any line starting with an asterisk is a comment line.
also note that the commands after the $$DD01 can not start in column 1 ( the editor for the bbs is truncating leading spaces in my reply ).
Chuck H.
***
*** this will replace starting in column 1 for the length
*** of the entire input record
***
EDITALL=(1,0,C'A',C'X'), CHANGE ALL 'A' TO 'X'
EDITALL=(1,0,C'C',C'Z'), CHANGE ALL 'C' TO 'Z'
DUMP=10,OUT=0
note that you can include comments much like jcl any line starting with an asterisk is a comment line.
also note that the commands after the $$DD01 can not start in column 1 ( the editor for the bbs is truncating leading spaces in my reply ).
Chuck H.
Chuck Haatvedt
email --> clastnameatcharterdotnet
(replace lastname, at, dot with appropriate
characters)
email --> clastnameatcharterdotnet
(replace lastname, at, dot with appropriate
characters)
FREE TUTORIALS
Tutorials
Free tutorials from mainframegurukul
- JCL Tutorial
Covers all important JCL concepts. - Cobol Tutorial
This tutorials covers all Cobol Topics from STRING to COMP-3. - DB2 Tutorial
DB2 Tutorial focuses on DB2 COBOL Programming. - SORT Tutorial
This Tutorial covers all important aspects of DFSORT with examples - CICS Tutorial
This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions
- Cobol Interview Questions
50+ Interview Questions - JCL Interview Questions
50+ Interview Questions - DB2 Interview Questions
100+ Interview Questions - CICS Interview Questions
70+ Interview Questions - VSAM Interview Questions
27 Interview Questions
Other References
Mainframe Tools and others
- XPEDITER Reference
Explains how we can debug a program - FILEAID Reference
Explains how to browse , edit and delete datasets - Change Man Reference
Quick Start tutorial on Changeman - Abend Reference
Important Abend codes explained - FaceBook Page
MainframeGurukul FaceBook Page - LinkedIn Page
MainframeGurkul Linkedin Page