//FILEAID1 EXEC PGM=FILEAID
//SYSPRINT DD SYSOUT=*
//DD01 DD DSN=input file,DISP=SHR
//DD01O DSN=Output file,DISP=SHR
//SYSIN DD *
$$DD01 COPYALL IF=(10,EQ,C'AAAA'),
ORIF=(10,EQ,C'BBBB'),
REPLALL=(5,9,C'DDDD',C'EEEE')
/*
the problem im facing here is :
Even if i give two conditional if .
It is checking only for ORIF(latest one)
and replacing DDDD with EEEE only when in finds BBBB and not Replacing DDDD with EEEE when it finds AAAA in 10th positon of INPUT FILE.
Can anyone please suggest??
i want to REPLACE ALL Records for both the condions .
This is just an example. Please do not suggest to use if - repl , orif - repl.
I want to replace all for multiple if condition at once(i.e REPLALL)
FILEAID - IF ORIF , REPALL not checking all conditions
Moderators: Anuj Dhawan, Moderator Group
-
- Member
- Posts: 18
- Joined: Wed Sep 21, 2011 9:47 am
- dbzTHEdinosauer
- Moderator
- Posts: 981
- Joined: Mon Oct 02, 2006 8:31 pm
that is not what REPLALL and COPYALL do.
go back and read the manual.
do you only want to copy those that satisfy you two conditions,
or do you want to copy the file and only change what satifies?
go back and read the manual.
do you only want to copy those that satisfy you two conditions,
or do you want to copy the file and only change what satifies?
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.
-
- Moderator
- Posts: 1625
- Joined: Sat Aug 09, 2008 9:02 am
- Location: Mumbai, India
My site does not have File-Aid, try this untested code, however:
Code: Select all
//SYSIN DD *
$$DD01 COPYALL IF=(10,EQ,C'AAAA,BBBB'),
REPL=(5,EQ,C'DDDD',C'EEEE'),
/*
Regards,
Anuj
Anuj
-
- Member
- Posts: 2
- Joined: Tue Dec 09, 2014 8:54 am
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