PK.VITLSET,
S(0)^/START,
@HDR,
@OPEN.NUR,
@IOSET,
@TRLR,
END;

HDR
"<?xml version="_D(34)_1.0_D(34)_" ?>"^!,
"<ReplyMessage>"^!,
"<TransactionId>0</TransactionId>"^!,
"<Status>Success</Status>"^!,
"<StatusDescription>Step returned a Success status.</StatusDescription>"^!,
"<Payload>"^!

TRLR
"</Payload>"^!,
"</ReplyMessage>"^!

OPEN.NUR
@misdir,
O(&,@misdict),
@pkdir

IOSET
"<IODefinitionList>"^!,
^&GCLPARAM^PARMS,
"Intake"^category,
""^ggv,
DO{+[PARMS,"INTAKE",ggv]^ggv @IO.DEF},
""^ggv,
DO{+/CONF[.ios.additional.intake.queries][ggv]^ggv @IO.DEF},
""^ggv,
"Output"^category,
DO{+[PARMS,"OUTPUT",ggv]^ggv @IO.DEF},
""^ggv,
DO{+/CONF[.ios.additional.output.queries][ggv]^ggv @IO.DEF},
"</IODefinitionList>"^!

IO.DEF
IF{ggv_.=. "empty, ignore";
   /V.QRY[ggv] "already in list";
   "otherwise",
      ggv^/V.QRY[ggv],
      "<IODefinition>"^!,
      "<Key>"_/START_"</Key>"^!,
      "<Category><![CDATA["_(category)_"]]></Category>"^!,
      @GET.NAME,
      "<Name><![CDATA["_(name)_"]]></Name>"^!,
      "<Display><![CDATA["_(name)_"]]></Display>"^!,
      "<Mnemonic><![CDATA["_(ggv)_"]]></Mnemonic>"^!,
      IF{/CONF[.ios.not.accumulable][ggv] "not accumulable",
         "<Accumulable>false</Accumulable>"^!},
      "</IODefinition>"^!}

GET.NAME
IF{&GGV[ggv]|1;ggv}:0S^name,
DO{+/CONF[.ios.remove.prefixes][str]^str "got a string",
   IF{L(name,str)=0 name%L(str):0S^name}}
