Debugger Question
Debugger Question
(OP)
I have the following code and need to be able to "step into" the next program using debugger. Do anyone know how to do this? This is not a fuction within the current program.
LET f_cmd = ""
LET f_cmd = "nohup SFDlopro01.4ge \"",
f_rpt_file CLIPPED, "\" \"",
f_rpt_prof_id USING "<<<<<<<<<&", "\" ",
m_rpt.dc_id, " ",
m_rpt.whse_id, " \"",
m_rpt.bloc_id, "\" \"",
m_rpt.eloc_id, "\" \"",
m_rpt.lcat_id, "\" \"",
m_rpt.bprod_id, "\" \"",
m_rpt.eprod_id, "\" \"",
m_rpt.prodclass_id, "\" \"",
m_rpt.order_by USING '&', "\" \"",
f_rpt_file CLIPPED, "\" \"",
f_rpt_prof_id USING "<<<<<<<<<&", "\" ",
" > /dev/null 2>&1 &"
CALL run_system_cmd(f_cmd)
LET f_cmd = ""
LET f_cmd = "nohup SFDlopro01.4ge \"",
f_rpt_file CLIPPED, "\" \"",
f_rpt_prof_id USING "<<<<<<<<<&", "\" ",
m_rpt.dc_id, " ",
m_rpt.whse_id, " \"",
m_rpt.bloc_id, "\" \"",
m_rpt.eloc_id, "\" \"",
m_rpt.lcat_id, "\" \"",
m_rpt.bprod_id, "\" \"",
m_rpt.eprod_id, "\" \"",
m_rpt.prodclass_id, "\" \"",
m_rpt.order_by USING '&', "\" \"",
f_rpt_file CLIPPED, "\" \"",
f_rpt_prof_id USING "<<<<<<<<<&", "\" ",
" > /dev/null 2>&1 &"
CALL run_system_cmd(f_cmd)
RE: Debugger Question
Sorry, but the debugger doesn't support stepping into a sub-program.
Regards,
Ed
RE: Debugger Question
RE: Debugger Question
I hope I'm not elaborating on the obvious, but here's some comments:
I identify run_system_cmd as 4GL function where ultimately you do something like this:
RUN f_cmd
1) Set a break point in run_system_cmd before the RUN executes. You can look at the value of f_cmd.
2) Since you're nohuping and the subprogram doesn't write to standard output, the subprogram should execute properly.
3) If you want to look at the string the way shell interprets it, you might try echoing f_cmd to an ascii file:
RUN "echo \"f_cmd\" > /tmp/f_cmd.txt"
(above command untested)
In conclusion, your nohuped subprogram appears to be a compiled 4GL program. If your goal is to debug it, you need to compile it to RDS and debug it separate from the calling program.
Sorry, but I probably haven't told you anything you've wanted to hear.
Regards,
Ed
RE: Debugger Question
Thanks anyway,
Ken