This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- | |
-- description: Find active Telnet or Interactive 5250 sessions | |
-- | |
-- resource: ibm.biz/WellDefinedIBMiPorts | |
-- | |
select remote_address, remote_port, authorization_name as user_name, job_name | |
from qsys2.netstat_job_info n | |
where local_port in (23,992) and job_type = 'INTERACTIVE'; | |
-- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- | |
-- ======================================================== | |
-- iSee - GO SAVE Option 21 ( Save Entire system ) deetz | |
-- ======================================================== | |
-- | |
-- Author: Scott Forstie | |
-- Date : September, 2023 | |
-- Email : [email protected] | |
-- | |
-- Details for the previous GO SAVE Option 21 operations are found |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- | |
-- Create, Replace, Delete, or Disable trigger programs | |
-- without acquiring an exclusive lock over the file | |
-- ======= | |
-- | |
-- Resource: ibmsystemsmag.com/blogs/i-can/august-2017/manage-trigger-programs-in-productions | |
-- Prepare to break the rules | |
call qsys2.override_qaqqini(1, '', ''); | |
-- Rules broken |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- | |
-- Use INCLUDE (SQL) to maintain reusable code segments. | |
-- and incorporate in scripts or SQL Procedures, Functions, and Triggers | |
-- Reference: http://ibm.biz/DB2fori_INCLUDE | |
-- | |
-- | |
-- description: Use the INCLUDE statement to pull | |
-- in and execute common pieces | |
-- of SQL |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- | |
-- description: This row permission can be used to disallow specific jobnames from selecting | |
-- data over a specific file | |
-- | |
cl:CHGFCNUSG FCNID(QIBM_DB_SECADM) USER(SCOTTF) USAGE(*ALLOWED); -- repeat this on the target (not yet mirrored) | |
set schema star1g ; | |
set path star1g ; | |
create table RowPermRules ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- | |
-- description: What spooled files does the current user own? | |
-- | |
select job_name, spooled_file_name, file_number, user_data, | |
create_timestamp | |
from qsys2.output_queue_entries_basic | |
where user_name = user; | |
stop; | |
-- | |
-- description: Query the contents of RUNSQLSTM spooled files for the current user |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Purpose: Delay job for fractions of a second | |
-- Author : Scott Forstie | |
-- Contact: [email protected] | |
-- Date : June 20, 2019 | |
cl: addlible QSYSINC; | |
cl: crtsrcpf qtemp/qcsrc; | |
cl: addpfm file(qtemp/qcsrc) mbr(usleep); | |
-- | |
-- The usleep() function suspends a thread for the number of microseconds specified by the of useconds parameter. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- ================================================= | |
-- author: Scott Forstie | |
-- date : May 29, 2019 | |
-- email : [email protected] | |
-- disclaimer - no implied warranties, yada yada | |
-- ================================================= | |
-- | |
-- Super Fast retrieval of library and schema name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- setup | |
cl: STRTCPSVR SERVER(*SMTP) ; | |
cl: ADDUSRSMTP USRPRF(SCOTTF); | |
cl: ADDUSRSMTP USRPRF(TIMMR); | |
-- Send SMTP E-mail Message (SNDSMTPEMM) | |
cl:SNDSMTPEMM RCP(('[email protected]' *pri)) SUBJECT('hello world again') NOTE('this is a new note'); | |
cl:SNDSMTPEMM RCP(('[email protected]' *pri)) SUBJECT('hello world again') NOTE('this is a new note'); | |
select * from SQLISFUN00.may17objs; |