getScreen


The getScreen () function returns the contents of the console screen as an array of strings. Each item in the array is one line on the screen.

Parameters

This function takes no parameters.

Returns

An array of strings with the text of the console.

Example:

The following examines the screen and returns the scroll mode.

function reportScreenMode()

lines = getScreen()

// The mode line on a z/OS console looks like:

// IEE163I MODE= RD

// it is the last line of the console

// Use a regular expression to pull out the word after the MODE= // fragment.

statusLine = lines[lines.size() - 1]

results = regex(statusLine, "^.*MODE=\s*(\S.*)$")

newmsg = createMessage("Mode is " & results.GROUPS[0])

sendMessageToAllViewers(newmsg)

return results.groups[0]

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*