IBM Support

FAQ: Is it possible to pass a variable into a script using the 'exec' command in the translator? (SCI48331) *|* -84D72E94

Question & Answer


Question

FAQ: Is it possible to pass a variable into a script using the 'exec' command in the translator? (SCI48331) *|* -84D72E94E133FE5B852579180040D204- *|*

Answer

Technote (FAQ)


Question

FAQ: Is it possible to pass a variable into a script using the 'exec' command in the translator? (SCI48331)

Answer

Within an extended rule:



1. The variable being passed to the exec command must be held within brackets



2. If the parameter being called contains preceding spaces it must be held within quotes in order to pass the full string to the program.



Example:



string [90] MailString;

string [120] ProgramName;

integer nReturn;

nReturn = 0;

Begin



MailString = "\"" +"New Blanket Order Document: " + #SYEDOC + " Trading Partner: " + #SYPNID + "\"";

ProgramName = "C:\Mailscript.cmd" + "MailString"

nReturn 0 exec (ProgramName);



End

Historical Number

PRI30101

Product Alias/Synonym

Fact


Gentran:Server for Windows All Releases
SCI48331

Goal


FAQ: Is it possible to pass a variable into a script using the
'exec' command in the translator

[{"Business Unit":{"code":"BU055","label":"Cognitive Applications"},"Product":{"code":"SS73G6","label":"Sterling Total Payments for Financial Services"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
12 October 2021

UID

ibm10767063