Keep in mind that there are all sorts of ways to do this. The sample below is based on something we did with Mercator 6.0 and PL/SQL. It's still in use today.
map1: output card-1 rule...
run("map2" " -ID1 '-VAR F_ID=''" + FILE_ID_NO + "'' -VAR F_CONFIG=''" + CONFIG_NO + "'' -VAR M_SUB=''" + MEMBER_ID + "'''")
map2: input card-1....
source: DB
DBQueryFile: path\file.mdg
Database: DB Name defined in MDQ file
Query: Query/Call in the MDQ file
DBIDB MDQ File
Define DB Name
Point to SID
Enter proper ID/PW
Define call as a query...
call procedure_name(#f_id#,#f_config#,#m_sub#,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
Each "?" represents data returned by SP. We generated the tree from the procedure and then had to modify it. Below is an example of what the returned data looed like...
[field1]|[field2a|field2b|field2c]|[field3a|field3b|field3c]|[field4a|field4b|field4c]|[...]....