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 or replace table qtemp.ftpcmd(cmd char(240)) on replace delete rows; | |
create or replace table qtemp.ftplog(line char(240)) on replace delete rows; | |
insert into qtemp.ftpcmd(CMD) values | |
('anonymous [email protected]') | |
,('namefmt 1') | |
,('lcd /tmp') | |
,('cd /software/ibmi/products/pase/rpms') | |
,('bin') | |
,('get README.md (replace') |
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; |
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
WITH FILES( | |
objLib, | |
objName, | |
objSize, | |
objText, | |
journalLibrary, | |
journalName) | |
AS ( | |
SELECT OBJLIB, | |
OBJNAME, |
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
-- Read *csv File from IFS | |
With x as (-- Split IFS File into Rows (at CRLF) | |
Select Ordinal_Position as RowKey, Element as RowInfo | |
from Table(SysTools.Split(Get_Clob_From_File('/home/myFile.csv'), x'0D25')) a | |
Where Trim(Element) > ''), | |
y as (-- Split IFS File Rows into Columns (and remove leading/trailing double quotes ") | |
Select x.*, Ordinal_Position ColKey, | |
Trim(B '"' from Element) as ColInfo | |
from x cross join Table(SysTools.Split(RowInfo, ',')) a) | |
-- Return the Result as Table |
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
-- Determine DDS described physical files with unique Keys | |
SELECT a.* | |
FROM QSYS2.SYSPARTITIONINDEXSTAT a | |
WHERE Table_Schema = 'yourSchema' | |
AND Index_Type = 'PHYSICAL' | |
AND UNIQUE = '0'; |