PK.IOSET,
S(0)^/START,
"HDR",@1,
"IOSET",@3,
"TRLR",@2,
END;

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

[2]::TRLR
"</Payload>"^!,
"</ReplyMessage>"^!;

[3]::IOSET
"<IODefinitionList>"^!,
^&(NP)NPARAM^PARMS,
"Intake"^category,
""^ggv,
DO{+[PARMS,"INTAKE",ggv]^ggv "IO.DEF",@4},
""^ggv,
DO{+/CONF[.ios.additional.intake.queries][ggv]^ggv "IO.DEF",@4},
""^ggv,
"Output"^category,
DO{+[PARMS,"OUTPUT",ggv]^ggv "IO.DEF",@4},
""^ggv,
DO{+/CONF[.ios.additional.output.queries][ggv]^ggv "IO.DEF",@4},
"</IODefinitionList>"^!;

[4]::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",@5,
      "<Name><![CDATA["_(name)_"]]></Name>"^!,
      "<Display><![CDATA["_(name)_"]]></Display>"^!,
      "<Mnemonic><![CDATA["_(ggv)_"]]></Mnemonic>"^!,
      IF{/CONF[.ios.not.accumulable][ggv] "not accumulable",
         "<Accumulable>false</Accumulable>"^!},
      "</IODefinition>"^!};

[5]::GET.NAME
IF{&(G)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}};
