Wednesday, July 2, 2008

Platinum commands

S COMMAND COMMAND DESCRIPTION

RC/QUERY TABLE REPORT OPTIONS
_ A - RQTA Table Alias
_ D - RQTD Table Detail
_ L - RQTL Table List
_ P - RQTP Table Plan Inquiry
_ S - RQTS Table Synonym Inquiry
_ I - RQTI Table Index Inquiry
_ C - RQTC Table Column Inquiry
_ V - RQTV Table View Inquiry
_ HL - RQTHL Table History List
_ HD - RQTHD Table Detail History
_ HS - RQTHS Table Stats. History
_ HP - RQTHP Table Partition History
_ O - RQOD Object Dependency
_ UA - RQTUA Table User Authorization Inq
_ PA - RQTPA Table Plan Authorization Inq
_ KA - RQTKA Table Package Authorization Inq
_ PK - RQTPK Table Package Inquiry
_ UC - RQTUCS Table Unique Constraint Inquiry
_ DI - RQTDI Table Drop Impact
_ LR - RQTLR Table Lob Relationships
_ TG - RQTTG Table Trigger

RC/QUERY AVAILABLE REPORT OBJECTS
_ C OPTIONS - Column
_ SY OPTIONS - System
_ RI OPTIONS - Referential Integrity
_ U OPTIONS - User

GENERAL LINE COMMANDS
_ COUNT - Display number of table rows
_ DDL - Create DDL for an object
_ DELETE - Jump to ISQL to delete from a table or view
S COMMAND COMMAND DESCRIPTION
_ DISPLAY - Jump to DB2C to display a DB/TS/IS/UDF or Stored Proc.
_ DISPLKS - Display database/tablespace/indexspace with LOCKS
_ DISPLPL - Display database/tablespace/indexspace with LPL
_ DISPUSE - Display database/tablespace/indexspace with USE
_ FSTART - Start a database and/or tablespace/indexspace
_ FSTOP - Stop a database and/or tablespace/indexspace
_ INSERT - Jump to ISQL to insert into a table or view
_ LGRANT - Grant privileges to users
_ LOAD - Create JCL for LOAD Utility
_ LREVOKE - Revoke privileges from users
_ REFRESH - Refresh Materialized Query Table
_ SELECT - Jump to ISQL to select from a table or view
_ START - Jump to DB2C to start a DB/TS/IS/UDF or Stored Proc.
_ STARO - Jump to DB2C to start a DB/TS/IS in READ ONLY status
_ STAUT - Jump to DB2C to start a DB/TS/IS in UTILITY status
_ STAFO - Jump to DB2C to start a DB/TS/IS with ACCESS FORCE
_ STOP - Jump to DB2C to stop a DB/TS/IS/UDF or Stored Proc.
_ UPDATE - Jump to ISQL to update a table or view
_ UNLOAD - Create JCL for the FAST UNLOAD utility

LICENSED LINE COMMANDS
_ ALTER - Jump to RC/Update to alter an object
_ BROWSE - Jump to RC/Update to browse a table
_ COPYD - Jump to RC/Update to copy a table
_ COPYAUTH - Jump to RC/Secure to copy authorizations
_ CREATE - Jump to RC/Update to create an object
_ DROP - Jump to RC/Update to drop an object
_ EDIT - Jump to RC/Update to edit a table
_ FBROWSE - Jump to RC/Update to browse a table
_ FEDIT - Jump to RC/Update to edit a table
_ GRANT - Jump to RC/Secure for GRANT services
_ QMIGRATE - Jump to RC/Migrator to perform Quick Migrations
_ REVOKE - Jump to RC/Secure for REVOKE services
_ TEMPLATE - Jump to RC/Update to template an object
_ LISTCAT - IDCAMS Listcat of tablespace/indexspace
_ EX - Execute Clist or REXX Exec
_ TESTEX1 - SAMPLE REXX EXEC
******************************* BOTTOM OF DATA ************




S COMMAND COMMAND DESCRIPTION

RC/QUERY SYNONYM REPORT OPTIONS
_ L - RQSL Synonym List
_ T - RQST Synonym Table Inquiry
_ V - RQSV Synonym View Inquiry
_ P - RQSP Synonym Plan Inquiry
_ PK - RQSPK Synonym Package Inquiry
_ DI - RQSDI Synonym Drop Impact

RC/QUERY AVAILABLE REPORT OBJECTS
_ T OPTIONS - Table
_ C OPTIONS - Column
_ SY OPTIONS - System
_ RI OPTIONS - Referential Integrity
_ U OPTIONS - User

picture string

= any character . invalid characters
@ alphabetic characters - non-numeric characters
# numeric characters < lower case alphabetics
$ special characters > upper case alphabetics
¬ non-blank characters

FTP DOS

verboseopen 159.xxx.xxx.xxuseridpwwdxxascd "'PFM.SBA.LDDNB504.D200608'";quo site xlate=canftptrquo site xlate=canftpnzquo site autorecall pr
lcd C:\SBA-AUG06
get AUDREF LDDNB504.txt
cd "'PFM.SBA.LDDNB7A.D200608'"get AUDREF LDDNB7A.txt
cd "'PFM.SBA.LDSBA504.D200608'" get AUDREF LDSBA504.txt
cd "'PFM.SBA.LDSBA7A.D200608'" get AUDREF LDSBA7A.txt
cd "'PFM.SBA.LNDNB504.D200608'" get AUDREF LNDNB504.txt
cd "'PFM.SBA.LNDNB7A.D200608'" get AUDREF LNDNB7A.txt

bye

rowid

Our env: DB2 v8.1 on AIX5.3
My question is, I have a SQL statement which works fine in oracle...
update mytab set c1 = -c1 where rowid = v_rowid;
I need an equivalent in db2 (I am aware rowid equivalent is row_number() over() but I am wondering how to assign the left hand part of rowid because mytab table does not contain the column rowid!!).
Any ideas? thanks.
dr_suresh20 View Public Profile Send a private message to dr_suresh20 Send email to dr_suresh20 Find all posts by dr_suresh20
#2 08-07-06, 11:44 Peter.Vanroose Registered User Join Date: Sep 2004Location: BelgiumPosts: 602 Essentially there is no equivalent in DB2.The logic behind this being that there is no "natural" rowid attached to a certain row: a certain row can be the 4th result row from a certain query, but the same row could as well be the 6th row from the SAME query on the SAME table when the optimizer chose to implement the query differently! (E.g., with or without the use of an index.)
Typically you probably wanted to change a value in the row with rowid=4 because some (independent) program logic found out that this row had a certain property, i.e., "where" condition.In that case you could do one of three things:1. Add that condition to your UPDATE statement:update mytab set c1 = -c1 where CONDITION;2. Suppose you are running through a result table with a cursor, and at a certain iteration the condition applies for the current row; in that case useupdate mytab set c1 = -c1 where CURRENT OF cursorname;3. Use a subquery to produce the primary key values of mytab that satisfy the condition:update mytab set c1 = -c1 where mytab.pkey IN ( SELECT pkey FROM mytab WHERE CONDITION );__________________--_Peter Vanroose,__IBM Certified Database Administrator, DB2 V8 z/OS__IBM Certified Application Developer, DB2 V8__ABIS Training and Consulting__http://www.abis.be/

Every record stored has a ROWID; which is a combination of page(block)#,slot #(within a page) and file#(and optionally object#). ROWID is the fastest way of getting to a record; is used by indexes. Oracle provides it as a pseudocolumn; db2 does NOT provide rowid. Rowid is fixed,constant, immutable till you do a REORG. If you analyze some records and you want to modify or select those records again, you should store their rowids so that you can get to them most efficiently. ROWNUM is different; IN db2 rowid is 4 bytes; 3 for page# and one for slot#; one byte, 8 bits can go up to 255; that's why you have 255 record limit per page; in VIPER you have 4byte page and 2 byte slot#;so you have bigger limits on table size and # of records per page.

qmf commands

LIST QUERIES

LIST TABLES


Command What it does

CONVERT Converts a prompted, QBE, or SQL query into an equivalent SQL
query. The comments in the original query do not appear in the
converted query.

DISPLAY Retrieve an object from the database and display it on your
terminal.

EDIT Edit a table in the database using the Table Editor. From the
database object list, you can only use the EDIT command to edit
a table. If you want to edit a query or procedure, you must
display it first.

ERASE Delete an object from the database.

EXIT End your QMF session.

EXPORT Export QMF objects stored in the database directly from the
database into a file (CMS), data set (TSO and CICS/MVS), or
queue name (CICS).

IMPORT Import QMF objects directly into the database from a file
(CMS), data set (TSO and CICS/MVS), or data queue name (CICS).

LAYOUT Display the format of a report produced from a given form
without using any data. You can only use LAYOUT with form
objects, and only in an environment in which both REXX and ISPF
are available.

PRINT Print a database object.

RUN Execute a query or procedure stored in the database.

SAVE Replace the object in the database with the object currently in
temporary storage. For example, if you enter:

SAVE QUERY AS

next to a query on the database object list, QMF replaces that
query in the database with the query currently in temporary
storage.


Using a Placeholder on the List of Database Objects

You can use a slash / as a placeholder to represent the object type, owner,
and name in a QMF command.

For example, entering the following in the Action area for a table object:

EDIT / (MODE=ADD

means the same as entering:

EDIT TABLE owner.tablename (MODE=ADD

where owner.tablename is the owner and name of the table listed.

You can also use /T if you just want to specify the object type, or /N if
you just want to specify the owner and name. The /T and /N placeholders
are especially useful if you are issuing a command to run a user-written
application that requires just the object type or just the object owner an
name.

If you are displaying a list from a remote location, the placeholder
symbols (/ and /N) include the location with the owner and name.

You can also display the prompt panel for a command with the object type
and the object owner and name filled in. To do this, type the command
followed by the / placeholder and a question mark.

For example, to display the RUN Command Prompt panel for the DEPTQUERY
object, enter "RUN / ?" in the Action area next to the object. The RUN
QUERY Command Prompt panels display. The first panel already has the







The placeholder options that you can enter are:

- "/T" - to display object type
- "/N" - to display owner.name
- "/" - to display both object type and owner.name