SPUFI
An ISPF tool for running SQL against DB2 for z/OS: you write the SQL in a dataset, run it, and read the results in another dataset.
Also written SQL Processor Using File Input, DB2I, DSNTEP2, QMF
SPUFI stands for SQL Processor Using File Input. It is the standard way to run SQL by hand on DB2 for z/OS from ISPF, and it is found on the DB2I menu.
It works with datasets. You name an input dataset, where you write one or more SQL statements, and an output dataset for the results. SPUFI opens the input in the editor. When you leave the editor, it runs the SQL against DB2 and shows the output, with any result rows and the SQLCODE for each statement.
People use it to check data, test a query before putting it in a program, and create or change tables. It runs under your own user ID, so you can only see and change what DB2 allows you to.
By default SPUFI commits changes when it finishes, which matters if you run an UPDATE or DELETE. For running SQL in batch, sites use a program such as DSNTEP2. Some sites also offer QMF or desktop database tools, but SPUFI is available almost everywhere.
Where can I learn this hands-on?
Right here, at ZedBank. You take a junior job at a simulated bank and learn each part of the work by doing it, with Zed beside you. There's nothing to install.
Start at ZedBankRelated
- SQLThe language used to query and change relational data. The same SQL used everywhere else, running against mainframe tables.
- DB2 for z/OSIBM's relational database on the mainframe, where a great deal of the world's banking and insurance data is stored.
- ISPFThe full-screen, menu-driven workbench most people use to do their day-to-day work on z/OS.
- SQLCODEThe result code DB2 returns after every SQL statement, saying whether it worked and what happened if it did not.
- DatasetWhat a mainframe calls a file: a named collection of records with a defined structure, rather than a loose stream of bytes.