Running QAD mfg/pro program using mbpro, do I need mf.p to r

Posted by sjaka80 on 10-Aug-2018 08:57

I'm trying to run a QAD mfg/pro (running on Progress 10.1) program using mbpro command. I've provided the database, Propath and other startup parameters to my shell script. When I run the script, mbpro runs the .r program. But issue I'm facing is when my program runs through mbpro, it can't find variables like global_db etc. I get the error in the errorfile.err:

Shared variable global_user_lang_dir has not yet been created. (392)

When I run the same program from mfg/pro menu, it runs without issue. Which makes me think that the environment is not loaded with all the information. Do I need to run mf.p along with mbpro to load all environment variables? My script file is as follows:

exec $DLC/bin/mbpro \
 -p xxtestprogram.r\
 -d mdy -yy 1990 -Bt 350 -c 30 -D 100 -mmax 3000 -nb 200 -s 3500 \
 > errorfile.err

All Replies

Posted by Marco Mendoza on 13-Aug-2018 08:54

Yes, you need a program that makes the call, something like this

/*Program xxrun01.p */
OUTPUT TO VALUE(archivo + ".cimin"). PUT UNFORMATTED "someuser thepass" SKIP QUOTER(dominio) SKIP "xxtestprogram.p" SKIP "- - - - yes yes" SKIP /* parameters if need it */ "." SKIP "." SKIP "P" SKIP . OUTPUT CLOSE. INPUT FROM VALUE(archivo + ".cimin") NO-ECHO. OUTPUT TO VALUE(archivo + ".cimou"). RUN mf.p. INPUT CLOSE. OUTPUT CLOSE.

Posted by sjaka80 on 14-Aug-2018 20:45

Thanks Marco, but I'm not using CIM. My test program is very simple, that just fetch a sales order record (so nbr hard coded in the query) and save it to txt file. There is no input/ frame or anything else in the program:

output to abc.txt.
find first so_mstr no-lock where so_nbr = "123456" no-error.
if available so_mstr then do:
  display so_mstr with 3 columns.
output close.

Posted by rkane on 15-Aug-2018 08:02

Hi Marco,
Is that the whole program or is there a QAD include file you are not showing?  Where is it getting ‘global_user_lang_dir’ from?

This thread is closed