varrtto
varrtto

Reputation: 101

frmcmp exit status should not be 0

I'm trying to write a script to compile all forms, reports, libraries and menus in an Oracle 6i application (yeah, too old) that I'm supposed to start maintaining, but I got to the menus and it seems as if frmcmp still returns a 0 despite failing to compile an .mmb file.

To compile forms, for example, I have:

for i infind . -name '*.fmb' | awk -F. '{ print $2 }' do frmcmp userid=user/pass@database batch=yes module=/path$i.fmb module_type=form output_file=/path$i.fmx compile_all=yes window_state=minimize 2> errorcomform.log if [ ${?} != 0 ] then echo -e "${FALLA}FAILED${NORMAL}" fi done

This works fine, as ${?} returns 1 if the compilation fails. But if I try:

for i infind . -name '*.mmb' | awk -F. '{ print $2 }' do frmcmp userid=user/pass@database batch=yes module=/path$i.mmb module_type=menu output_file=/path$i.mmx compile_all=yes window_state=minimize 2> errorcomform.log if [ ${?} != 0 ] then echo -e "${FALLA}FAILED${NORMAL}" fi done

As you can see, the only major diference, is the value of module type=formthat changes to menu.

Also, nothing is written in errorcomform.log.

To generate the error, I just grab any other file (for example an .mmx or any text file) and change it to .mmb so the find will find it. Despite it doesn't generate an .mmx file, it seems that frmcmp is still returning 0 and not showing the error message.

Does anyone has a clue on this? Since it's an outdated technology, google is not giving many responses.

Thanks in advance.

Upvotes: 0

Views: 781

Answers (1)

nightfox79
nightfox79

Reputation: 2119

You should just check if you got an .fmx or .mmx or .plx file. If this is not the case you can assume the compilation failed.

We use it also this way and it works very good.

Upvotes: 1

Related Questions