46
Cool stuff that you may not have known was in i By Rob Berendt and others April 2008

Cool stuff that you may not have known was in i By Rob Berendt and others April 2008

Embed Size (px)

Citation preview

Page 1: Cool stuff that you may not have known was in i By Rob Berendt and others April 2008

Cool stuff that you may not have known was in i

By Rob Berendt and others

April 2008

Page 2: 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

Page 3: Cool stuff that you may not have known was in i By Rob Berendt and others April 2008

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…

Page 4: Cool stuff that you may not have known was in i By Rob Berendt and others April 2008

RUNQRY

To quickly display the contents of a file, even without Query/400 installed, tryRUNQRY *N filenameOrRUNQRY QRYFILE((filename))

Page 5: Cool stuff that you may not have known was in i By Rob Berendt and others April 2008

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.

Page 6: Cool stuff that you may not have known was in i By Rob Berendt and others April 2008

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?

Page 7: Cool stuff that you may not have known was in i By Rob Berendt and others April 2008

Customized sign on

Page 8: Cool stuff that you may not have known was in i By Rob Berendt and others April 2008

5250 Hotspots

Page 9: Cool stuff that you may not have known was in i By Rob Berendt and others April 2008

Polymorphic GUIPull down menus and scroll bars, even in 5250

Page 10: Cool stuff that you may not have known was in i By Rob Berendt and others April 2008

Imbedding PC commands

STRPCOSTRPCCMD PCCMD('explorer http://maiL.YAHOO.COM')

See also RUNRMTCMD

Page 11: Cool stuff that you may not have known was in i By Rob Berendt and others April 2008

FTP directly

You can ftp directly to, or from, your i.You can even set up ftp scripts to automate this.

Page 12: Cool stuff that you may not have known was in i By Rob Berendt and others April 2008

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.

Page 13: Cool stuff that you may not have known was in i By Rob Berendt and others April 2008

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.

Page 14: Cool stuff that you may not have known was in i By Rob Berendt and others April 2008

Journalling

Journalling your data files provides many capabilities.Such as:• Data auditing• RMVJRNCHG• APYJRNCHG• COMMIT or ROLLBACK when in STRSQL.

Page 15: Cool stuff that you may not have known was in i By Rob Berendt and others April 2008

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?)

Page 16: Cool stuff that you may not have known was in i By Rob Berendt and others April 2008

F9 for command line

Page 17: Cool stuff that you may not have known was in i By Rob Berendt and others April 2008

F1 for help on a message

Page 18: Cool stuff that you may not have known was in i By Rob Berendt and others April 2008

F1 (cont)

Page 19: Cool stuff that you may not have known was in i By Rob Berendt and others April 2008

CALL QCMDDon’t forget F10 for Detail

Page 20: Cool stuff that you may not have known was in i By Rob Berendt and others April 2008

F14 to show command

Page 21: Cool stuff that you may not have known was in i By Rob Berendt and others April 2008

F14 (cont)

Page 22: Cool stuff that you may not have known was in i By Rob Berendt and others April 2008

Ampersand to expand

Page 23: Cool stuff that you may not have known was in i By Rob Berendt and others April 2008

Ampersand (cont)

Page 24: Cool stuff that you may not have known was in i By Rob Berendt and others April 2008

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’

Page 25: Cool stuff that you may not have known was in i By Rob Berendt and others April 2008

EDTF (cont)

Page 26: Cool stuff that you may not have known was in i By Rob Berendt and others April 2008

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)

Page 27: Cool stuff that you may not have known was in i By Rob Berendt and others April 2008

System DatabaseQSYS2 library contains “views” to the system database. In there are many names familiar to MS SQL Server such asSYSTABLESSYSCOLUMNSSYSVIEWSSYSPARTITIONSTAT

Page 28: Cool stuff that you may not have known was in i By Rob Berendt and others April 2008

STRSQL – F15

SELECT * FROM QSYS2.SYSPARTITIONSTAT WHERE TABLE_SCHEMA = 'ROB‘

SELECT * FROM QSYS2.SYSPARTITIONSTAT WHERE TABLE_SCHEMA = 'ROB'

Page 29: Cool stuff that you may not have known was in i By Rob Berendt and others April 2008

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.

Page 30: Cool stuff that you may not have known was in i By Rob Berendt and others April 2008

Command prompt screens

Page 31: Cool stuff that you may not have known was in i By Rob Berendt and others April 2008

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')

Page 32: Cool stuff that you may not have known was in i By Rob Berendt and others April 2008

QSHELL

There are numerous commands available within QSHELL, such as built in support for zipping files.

Page 33: Cool stuff that you may not have known was in i By Rob Berendt and others April 2008

MISCNET.DATAINETD

Page 34: Cool stuff that you may not have known was in i By Rob Berendt and others April 2008

MISC

CPYFRGZPFMREXXVirtual LAN

Page 35: Cool stuff that you may not have known was in i By Rob Berendt and others April 2008

RTVDSKINF & PRTDSKINF

Page 36: Cool stuff that you may not have known was in i By Rob Berendt and others April 2008

PTF ManagementFix Central to locate, order and download PTF’s directly to the system.Image catalogs to move PTFs between systems.

Page 37: Cool stuff that you may not have known was in i By Rob Berendt and others April 2008

Running a Query in debug

Some good index advice can be retrieved by running that query under STRDBG.

Page 38: Cool stuff that you may not have known was in i By Rob Berendt and others April 2008

iNav spool files

Page 39: Cool stuff that you may not have known was in i By Rob Berendt and others April 2008

iNav Shortcuts

Page 40: Cool stuff that you may not have known was in i By Rob Berendt and others April 2008

iNav, GUI UPDDTA

Page 41: Cool stuff that you may not have known was in i By Rob Berendt and others April 2008

iNav Run Sql Scripts

Page 42: Cool stuff that you may not have known was in i By Rob Berendt and others April 2008

Index Advisor

Page 43: Cool stuff that you may not have known was in i By Rob Berendt and others April 2008

Visual Explain

Page 44: Cool stuff that you may not have known was in i By Rob Berendt and others April 2008

Index Advisor (more)

Page 45: Cool stuff that you may not have known was in i By Rob Berendt and others April 2008

System Monitors

Page 46: Cool stuff that you may not have known was in i By Rob Berendt and others April 2008

iNav for Wireless