Upload
mitchell-thompson
View
215
Download
0
Embed Size (px)
Citation preview
Cool stuff that you may not have known was in i
By Rob Berendt and others
April 2008
Built in Job SchedulerWRKJOBSCDE 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(([email protected])) 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, tryRUNQRY *N filenameOrRUNQRY 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 delimitedfile, put it in the IFS and have it accessed by your usersas an EXCEL file?
Customized sign on
5250 Hotspots
Polymorphic GUIPull down menus and scroll bars, even in 5250
Imbedding PC commands
STRPCOSTRPCCMD 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 WRKQRYis a great tool for easy reports.If you do not have it, then you can use RUNSQLSTM orCRTQMQRY 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 somethingI 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.
TriggersTriggers 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?)
F9 for command line
F1 for help on a message
F1 (cont)
CALL QCMDDon’t forget F10 for Detail
F14 to show command
F14 (cont)
Ampersand to expand
Ampersand (cont)
EDTFEDTF 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 thingssuch as:• Sort by various columns• Recursive deletesIf 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’
EDTF (cont)
IFS commands on “normal” stuffYou 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 DatabaseQSYS2 library contains “views” to the system database. In there are many names familiar to MS SQL Server such asSYSTABLESSYSCOLUMNSSYSVIEWSSYSPARTITIONSTAT
STRSQL – F15
SELECT * FROM QSYS2.SYSPARTITIONSTAT WHERE TABLE_SCHEMA = 'ROB‘
SELECT * FROM QSYS2.SYSPARTITIONSTAT WHERE TABLE_SCHEMA = 'ROB'
RTVCLSRCRTVCLSRC 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 screens
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.
MISCNET.DATAINETD
MISC
CPYFRGZPFMREXXVirtual LAN
RTVDSKINF & PRTDSKINF
PTF ManagementFix 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.
iNav spool files
iNav Shortcuts
iNav, GUI UPDDTA
iNav Run Sql Scripts
Index Advisor
Visual Explain
Index Advisor (more)
System Monitors
iNav for Wireless