MainframeSupports
tip week 41/2008:

Tip of the week is on holiday. The next tip will be published on the 3rd of november 2008.

Ugens tip holder ferie. Nęste tip udkommer den 3. november 2008.

QMF is in many ways a good tool especially when you have tuned it with the user written commands I described in week 4/2008. There is one irritating detail left (apart from the fact that split screen does not work properly): the EDIT QUERY command. The EDIT session which is started is simply not good enough. The command line is at the bottom and the F-keys are all wrong. If you just were able to get an EDIT session corresponding to the one you are using when working directly in ISPF...

Well, it is indeed possible. To take advantage of the following guidelines first you have to read and use the the above mentioned tip about QMF. Then you must create a new command:

INSERT INTO QMF_COMMANDS
(VERB, OBJECT, SYNONYM_DEFINITION, REMARKS)
VALUES
('EQ'
,NULL
,'RUN PROC EQ'
,NULL
);

Then you must create QMF procedure EQ:

EDIT QUERY (E=MYEQEDIT
MESSAGE (TEXT = 'OK, ISPF EDIT session completed.'

Please notice the parameter (E=MYEQEDIT. This parameter forces QMF to execute a REXX with the name MYEQEDIT. This REXX has to be located in either the SYSEXEC or the SYSPROC concatenation. And it should look like this:

/* REXX: MYEQEDIT */
ADDRESS ISPEXEC
"VGET ZAPPLID"
IF ZAPPLID = 'DSQE'
THEN
  "SELECT CMD(%MYEQEDIT) NEWAPPL(ISP)"
ELSE DO
  "LMINIT DATAID(MYDATAID) DDNAME(DSQEDIT)"
  "EDIT DATAID("MYDATAID")"
  "LMFREE DATAID("MYDATAID")"
END
EXIT 0

This REXX forces the ISPF editor to be started using the ISPF applid ISP. If the ISPF applid for your preferred ISPF EDIT session is different from ISP then you should code this ISPF applid in the NEWAPPL parameter. And just a warning: if you for some reason uses NEWAPPL(DSQE) the REXX will loop. Please avoid this for your own sake. The idea behind the REXX is to avoid applid DSQE so there is not any reason for trying.

When you have coded the above REXX and saved it in a dataset allocated to SYSEXEC or SYSPROC and you have exit'ed QMF after inserting the EQ command, then you are ready to use EQ as a command in QMF and experience how it is to use an ISPF editor in QMF with the same look and feel as the ISPF editor anywhere else.

Again I got annoyed with IBM because I once again found out that the most interesting stuff is hidden away in manuals with the most boring titles. The goodies in this tip I located in Installing and managing QMF.

Previous tip in english        Sidste danske tip        Tip list