FILEAID - IF ORIF , REPALL not checking all conditions

In this Mainframe Forum - You can post your queries on FILE-AID tool

Moderators: Anuj Dhawan, Moderator Group

Post Reply
bhargavi_ns
Member
Posts: 18
Joined: Wed Sep 21, 2011 9:47 am

FILEAID - IF ORIF , REPALL not checking all conditions

Post by bhargavi_ns » Tue May 15, 2012 7:24 pm

//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)

User avatar
dbzTHEdinosauer
Moderator
Posts: 981
Joined: Mon Oct 02, 2006 8:31 pm

Post by dbzTHEdinosauer » Tue May 15, 2012 7:49 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?
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Post by Anuj Dhawan » Wed May 16, 2012 8:01 pm

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

Terrymusicy
Member
Posts: 2
Joined: Tue Dec 09, 2014 8:54 am

Post by Terrymusicy » Tue Dec 09, 2014 9:22 am

It would be nice if you told me that information out.

Post Reply

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



Other References
Mainframe Tools and others