Page 1 of 1

FILEAID - IF ORIF , REPALL not checking all conditions

Posted: Tue May 15, 2012 7:24 pm
by bhargavi_ns
//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)

Posted: Tue May 15, 2012 7:49 pm
by dbzTHEdinosauer
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?

Posted: Wed May 16, 2012 8:01 pm
by Anuj Dhawan
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'), 
/*

Posted: Tue Dec 09, 2014 9:22 am
by Terrymusicy
It would be nice if you told me that information out.