470 likes | 666 Views
Cool stuff that you may not have known was in i. By Rob Berendt and others April 2008. Built in Job Scheduler. WRKJOBSCDE allows you to schedule jobs to run at various days, dates, times, etc. Sending email from your i. SNDDST will allow you to send email from i.
E N D
Cool stuff that you may not have known was in i By Rob Berendt and others April 2008
Built in Job Scheduler WRKJOBSCDE allows you to schedule jobs to run at various days, dates, times, etc
Sending email from your i SNDDST will allow you to send email from i. SNDDST TYPE(*LMSG) TOINTNET((rob@dekko.com)) DSTD('test description') LONGMSG('test long message') SUBJECT('Test subject') Can be useful for emailing to support, customers, cell phones…
RUNQRY To quickly display the contents of a file, even without Query/400 installed, try RUNQRY *N filename Or RUNQRY QRYFILE((filename))
GO SECTOOLS • You can do a lot with this menu: • Disable User IDs according with its activity (or lack thereof) in • the system. • Enable/Disable users according to a work schedule. • Check any "default" passwords, etc.
CPYTOIMPF Did you know that is *VERY* easy to create a TAB delimited file, put it in the IFS and have it accessed by your users as an EXCEL file?
Polymorphic GUI Pull down menus and scroll bars, even in 5250
Imbedding PC commands STRPCO STRPCCMD PCCMD('explorer http://maiL.YAHOO.COM') See also RUNRMTCMD
FTP directly You can ftp directly to, or from, your i. You can even set up ftp scripts to automate this.
WRKQRY WRKQRY requires 5722QU1. If you have it, then WRKQRY is a great tool for easy reports. If you do not have it, then you can use RUNSQLSTM or CRTQMQRY with STRQMQRY. You can use ANZQMQRY and RTVQMQRY to “decompile” queries created with WRKQRY to see the SQL behind it.
UPDDTA UPDDTA allows you to quickly edit the contents of a table. Great for quick fixes, or for simple tables, but not something I would show the general user population.
Journalling • Journalling your data files provides many capabilities. • Such as: • Data auditing • RMVJRNCHG • APYJRNCHG • COMMIT or ROLLBACK when in STRSQL.
Triggers • Triggers can be used to: • Send alerts when inventory balance is below safety stock • Alert IT when an employee is terminated. • Have actions performed on existing applications without • customizing them. (Remember Application Modernization • presentation?)
CALL QCMD Don’t forget F10 for Detail
EDTF • EDTF is an IFS, or Integrated File System command that is often • used to edit a text file in the IFS. It can be used to edit a source • member in i that does not have an editor such as SEU or RDi. • When used against a directory it can do some interesting things • such as: • Sort by various columns • Recursive deletes • If you use a lot of APIs you’ve used user spaces. They can be easily displayed, or edited by using: • EDTF ‘/QSYS.LIB/MYLIB.LIB/MYDATA.USRSPC’
IFS commands on “normal” stuff You can use IFS commands to perform operations against items in the “normal file system, or QSYS.LIB. One example is: CHGOWN ‘/QSYS.LIB/MYLIB.LIB/*’ NEWOWN(BUBBA)
System Database QSYS2 library contains “views” to the system database. In there are many names familiar to MS SQL Server such as SYSTABLES SYSCOLUMNS SYSVIEWS SYSPARTITIONSTAT
STRSQL – F15 SELECT * FROM QSYS2.SYSPARTITIONSTAT WHERE TABLE_SCHEMA = 'ROB‘ SELECT * FROM QSYS2.SYSPARTITIONSTAT WHERE TABLE_SCHEMA = 'ROB'
RTVCLSRC • RTVCLSRC can be used to decompile CL programs that have not had their observability removed. Quite handy for some programs like: • DSPSYSVAL QSTRUPPGM • System program that is used by GO SAVE option 21. • (By the way, GO SAVE 20 allows you to set the defaults for 21.) • Also, see GENCMDDOC.
Command Prompt (cont) CMD PROMPT('Purge file of outdated records') PARM KWD(FILE) TYPE(*CHAR) LEN(10) CHOICE('File + name') PROMPT('File from your library list') PARM KWD(DATEFIELD) TYPE(*CHAR) LEN(10) + CHOICE('Must be YYMMDD 6,0') PROMPT('Date + field') PARM KWD(DAYS) TYPE(*DEC) LEN(3) CHOICE(DAYS) + PROMPT('Number of days to retain')
QSHELL There are numerous commands available within QSHELL, such as built in support for zipping files.
MISC NET.DATA INETD
MISC CPYF RGZPFM REXX Virtual LAN
PTF Management Fix Central to locate, order and download PTF’s directly to the system. Image catalogs to move PTFs between systems.
Running a Query in debug Some good index advice can be retrieved by running that query under STRDBG.