#g4slkch_getChannelHistory

  *//////////////////////////////////////////////////////////////*     
  * #g4slkch_getChannelHistory - Get Channel History             *     
  *                                                              *     
  * Input:                                                       *     
  *   in_parameter (required) - The parameter name.              *     
  *   in_value (required) - The value of the parameter.          *     
  *                                                              *     
  * Output:                                                      *     
  *   out_errMsg - The error message (if error exists).          *     
  *                                                              *     
  * Returns:                                                     *     
  *   The number of history events for success, -1 for error.    *     
  *                                                              *     
  * Settable Variables ([r]=required)                            *     
  *   id - The Slack ID to use [r]                               *     
  *   team - The Slack Team to use [r]                           *     
  *   channel - The Channel Name to retrieve history for.        *     
  *   channel_id - The Channel ID to retrieve history for.       *     
  *     channel_id is required, not both.                        *     
  *   latest_timestamp - Enter the latest message timestamp to   *     
  *     retrieve messages for.  This value is inclusive.  If     *                
  *     left blank this will default to "now".                   *                
  *   oldest_timestamp - Enter the oldest message timestamp to   *                
  *     retrieve messages for.  This value is inclusive.  If     *                
  *     left blank this will default to the beginning of the     *                
  *     available history.                                       *                
  *   history_count - Enter the number of history records to     *                
  *     retrieve. Values between 1 and 1000 are accepted.        *                
  *   history_directory - Enter the fully qualified path to the  *                
  *     directory to contain the history message files.  The     *                
  *     default is /tmp.                                         *                
  *   ccsid - The CCSID to use (1208)                            *                
  *   debug - Turn on Debug (*NO, *YES)                          *                
  *   debug_file - The debug file name.                          *                
  *                 (/tmp/g4g_[id]_getChannelHistory.txt)        *                
  *                                                              *                
  *//////////////////////////////////////////////////////////////*                
 D #g4slkch_getChannelHistory...                                                  
 D                 PR            10i 0                                                 

D out_errMsg 256 Options(*NOPASS)

#g4slk_getChannelHistory is used retrieve this history for that channel. When the history is retrieved the results are placed in the G4SLKCHPF file. The text of each message will be placed in a stream file in the IFS named g4slk_hst_<id>.txt where <id> is a unique ID.

Returns: The number of channel history records retrieved or -1 for an error.

Optional Parameters:

  • Error Message (output) - Error message

Settable Variables (use #g4slk_setValue)

  • id (required) - The Slack ID to use to list channels.
  • team (required) - The Slack Team to use to join list channels.
  • channel - Enter the channel name you wish to retrieve history for.
  • channel_id - Enter the Channel ID you wish to retrieve history for. Only the Channel Name or Channel ID is required, not both.
  • latest_timestamp - Enter the latest timestamp value you'd like to retrieve history for. This value is inclusive. If this is left blank it will default to "now".
  • oldest_timestamp - Enter the oldest timestamp value you'd like to retrieve history for. This value is inclusive. If this is left blank it will default to the beginning of the available history.
  • history_count - Enter the maximum number of history entries to retrieve. The valid values are from 1 to 1000.
  • history_directory - Enter the fully qualified directory to place the history log messages in. This defaults to /tmp.
  • ccsid - The CCSID to use. The default is 1208.
  • debug - Specify *YES to turn on debug, or *NO to turn off debug. The default is *NO.
  • debug_file - Specify the fully qualified file name for the main debug file. The default is /tmp/g4slk_[id]_getChannelList.txt.