shell

Top  Previous  Next

Executes a program without the XFRAME runtime system , eventually providing a standard input (STDIN).

Syntax

shell(name, stdin)

Parameters

name

Name of the program to start and eventual arguments

stdin

(Optional) if supplied and not null, the content of  string is used as STDIN. Multiple lines must be separated by newline (\n) and/or carriage return (\r)

Return code

The exit code of the program.

Sample

myrc=shell("xvsam --list");
...
rc2=shell("xsort lrecl=80",
       " SORT FIELDS=COPY\n"+
  " INCLUDE ALL\n"
);