Difference between revisions of "AS400 Action"

From PresenceWiki
Jump to: navigation, search
(Command)
 
(17 intermediate revisions by 2 users not shown)
Line 1: Line 1:
http://www.international-presence.com/images/docs/as400/as400_action_header.png
+
[[file:as400_action_header.png]]
 
== AS400 Action Node ==
 
== AS400 Action Node ==
  
Line 26: Line 26:
 
As an example the following Read Data Area action:-
 
As an example the following Read Data Area action:-
  
http://www.international-presence.com/images/docs/as400/as400_readdataarea.png
+
[[file:as400_readdataarea.png]]
  
 
Results in this Datatable:-
 
Results in this Datatable:-
  
http://www.international-presence.com/images/docs/as400/as400_readdataarea_results.png
+
[[file:as400_readdataarearesults.png]]
  
 
== Program Call ==
 
== Program Call ==
Line 36: Line 36:
 
This action can be used to call a Program on the AS400, passing into it parameters and receiving returned parameters.
 
This action can be used to call a Program on the AS400, passing into it parameters and receiving returned parameters.
  
It requires <b>Library</b> and a <b>Program</b> followed by a <b>List of Parameters</b>
+
It requires <b>Library</b> and a <b>Program</b> followed by a <b>List of Parameters</b>.
  
 
These contain a <b>Param</b> value and if the parameter is to be altered by the program a <b>Return Param</b> name, <b>Type</b> and <b>Length</b>.
 
These contain a <b>Param</b> value and if the parameter is to be altered by the program a <b>Return Param</b> name, <b>Type</b> and <b>Length</b>.
Line 42: Line 42:
 
We can add or remove extra parameters with the Add and Remove buttons.
 
We can add or remove extra parameters with the Add and Remove buttons.
  
http://www.international-presence.com/images/docs/as400/as400_programcall.png
+
[[file:as400_programcall.png]]
  
Once you've set the parameters, you can go to the test tab and hit 'Test The Action'
+
Once you've set the parameters, you can go to the test tab and hit 'Test The Action'.
  
The output tab will let you know if anything went wrong such as the wrong number or type of parameters being passed to the call.
+
The output tab will let you know if anything went wrong, such as the wrong number or type of parameters being passed to the call.
  
http://www.international-presence.com/images/docs/as400/as400_output.png
+
[[file:as400_output.png]]
  
The results tab will again give you the data returned by the action
+
The results tab will again give you the data returned by the action.
  
http://www.international-presence.com/images/docs/as400/as400_results.png
+
[[file:as400_results.png]]
  
 
== Program Call Via A Command ==
 
== Program Call Via A Command ==
Line 61: Line 61:
  
 
<b>Call LIBRARY/PROGRAM PARM('p1','p2')</b>
 
<b>Call LIBRARY/PROGRAM PARM('p1','p2')</b>
 
Once again extra parameters can be added or removed.
 
  
 
As such, it can't return parameter values, or set parameter types.
 
As such, it can't return parameter values, or set parameter types.
 +
 +
Once again extra parameters can be added or removed.
  
 
== Command ==
 
== Command ==
  
This runs a basic <b>Command</b>, in the specified <b>Library</b> with the extra parameters specifying each <b>Key</b> and <b>value</b>.
+
This runs a basic <b>Command</b>, in the specified <b>Library</b> with the extra parameters specifying each <b>Key</b> and <b>Value</b>.
 +
 
 +
It effectively runs:-
  
 
<b>LIBRARY/COMMAND key1(value1) key2(value2)</b>
 
<b>LIBRARY/COMMAND key1(value1) key2(value2)</b>
Line 76: Line 78:
 
== Copy File ==
 
== Copy File ==
  
From
+
This action copies a file from a local file <b>From</b> to a location on the as400 <b>To</b>.
  
To
+
The <b>Return Column Name</b> will create a DataTable with this column name set to TRUE or FALSE depending
 +
on the successful action.
  
Return Column Name
+
It will also throw an error if the command fails.
 +
 
 +
[[file:as400_filecopy.png]]
 +
 
 +
Output:-
 +
 
 +
[[file:as400_filecopyoutput.png]]
  
 
== Check File Exists ==
 
== Check File Exists ==
  
File
+
This checks whether the file specified by <b>File</b> exists and will return TRUE or FALSE in the
 +
 
 +
<b>Return Column Name</b>, or throw an exception if the action fails.
 +
 
 +
[[file:as400_fileexists.png]]
 +
 
 +
Results:-
 +
 
 +
[[file:as400_fileexistsresults.png]]
  
Return Column Name
 
  
http://www.international-presence.com/images/docs/as400/as400_readdataarea.png
+
== See Also ==
  
http://www.international-presence.com/images/docs/as400/as400_readdataarearesults.png
+
{{Actions}}

Latest revision as of 12:50, 21 August 2015

As400 action header.png

AS400 Action Node

The purpose of this Node is to interact with the iSeries / AS400, for which you will need the hostname of the as400 (or ip address) along with a valid username and password.

The supported actions are:

Read Data Area

This is perhaps the simplest action available on the AS400 Actions list.

Select "Read Data Area" from the "Type of Request" drop down,

Then edit the Library Name,Object Name,Member Name and Member Type to specify the Data Area that is to be read.

Finally the Return Column Name specifies the Column Name to be created in the Presence Datatable into which the data value will be put.

As an example the following Read Data Area action:-

As400 readdataarea.png

Results in this Datatable:-

As400 readdataarearesults.png

Program Call

This action can be used to call a Program on the AS400, passing into it parameters and receiving returned parameters.

It requires Library and a Program followed by a List of Parameters.

These contain a Param value and if the parameter is to be altered by the program a Return Param name, Type and Length.

We can add or remove extra parameters with the Add and Remove buttons.

As400 programcall.png

Once you've set the parameters, you can go to the test tab and hit 'Test The Action'.

The output tab will let you know if anything went wrong, such as the wrong number or type of parameters being passed to the call.

As400 output.png

The results tab will again give you the data returned by the action.

As400 results.png

Program Call Via A Command

This is a simplified version of Program Call, and requires Library, Program and a list of Parameters

It effectively runs the command:-

Call LIBRARY/PROGRAM PARM('p1','p2')

As such, it can't return parameter values, or set parameter types.

Once again extra parameters can be added or removed.

Command

This runs a basic Command, in the specified Library with the extra parameters specifying each Key and Value.

It effectively runs:-

LIBRARY/COMMAND key1(value1) key2(value2)

Once again extra parameters can be added or removed.

Copy File

This action copies a file from a local file From to a location on the as400 To.

The Return Column Name will create a DataTable with this column name set to TRUE or FALSE depending on the successful action.

It will also throw an error if the command fails.

As400 filecopy.png

Output:-

As400 filecopyoutput.png

Check File Exists

This checks whether the file specified by File exists and will return TRUE or FALSE in the

Return Column Name, or throw an exception if the action fails.

As400 fileexists.png

Results:-

As400 fileexistsresults.png


See Also

Task Elements : Action Task Elements : AS400 Action

Send Email | Send SMS | Send Fax | Broadcast Messages
Read Text File | Read Binary File | Write Text File | Write Binary File | Parse File Action
Rename File | Copy File | Delete File | Parse File Action
Generate Bar Code | Read Bar Code
Dynamic Task Call | Call Native Program | FTP Upload | Scorecard Collector | Create Graph | AS400 Action
Socket Client Action | Socket Server Action
JMS Producer | JMS Consumer


Task Elements | Resources