DATA prog_range TYPE RANGE OF trdir-name.
SELECT 'I' AS sign, 'EQ' AS option, obj_name AS low, ' ' AS high
FROM tadir
WHERE pgmid = 'R3TR' AND object = 'PROG' AND devclass = @devclass
INTO TABLE @prog_range.
SELECT 'I' AS sign, 'CP' AS option, obj_name && '*' AS low, ' ' AS high
FROM tadir
WHERE pgmid = 'R3TR' AND object = 'CLAS' AND devclass = @devclass
APPENDING TABLE @prog_range.
* Not perfect, from 7.51 on the following is better
*SELECT 'I' AS sign, 'CP' AS option, concat( rpad( obj_name, 30, '=' ), '*' ) AS low,
* ' ' AS high
* FROM tadir
* WHERE pgmid = 'R3TR' AND object = 'CLAS' AND devclass = @devclass
* APPENDING TABLE @prog_range.
SELECT 'I' AS sign, 'EQ' AS option, 'SAPL' && obj_name AS low, ' ' AS high
FROM tadir
WHERE pgmid = 'R3TR' AND object = 'FUGR' AND devclass = @devclass
APPENDING TABLE @prog_range.
SELECT 'I' AS sign, 'CP' AS option, 'L' && obj_name && '+++' AS low, ' ' AS high
FROM tadir
WHERE pgmid = 'R3TR' AND object = 'FUGR' AND devclass = @devclass
APPENDING TABLE @prog_range.
DATA prog_range TYPE RANGE OF trdir-name.
SELECT 'I' AS sign, 'EQ' AS option, obj_name AS low, ' ' AS high
FROM tadir
WHERE pgmid = 'R3TR' AND object = 'PROG' AND devclass = @devclass
UNION
SELECT 'I' AS sign, 'CP' AS option, obj_name && '*' AS low, ' ' AS high
FROM tadir
WHERE pgmid = 'R3TR' AND object = 'CLAS' AND devclass = @devclass
*Not perfect, from 7.51 on the following is better
*SELECT 'I' AS sign, 'CP' AS option, concat( rpad( obj_name, 30, '=' ) , '*' ) AS low,
* ' ' AS high
* FROM tadir
* WHERE pgmid = 'R3TR' AND object = 'CLAS' AND devclass = @devclass
UNION
SELECT 'I' AS sign, 'EQ' AS option, 'SAPL' && obj_name AS low, ' ' AS high
FROM tadir
WHERE pgmid = 'R3TR' AND object = 'FUGR' AND devclass = @devclass
UNION
SELECT 'I' AS sign, 'CP' AS option, 'L' && obj_name && '+++' AS low, ' ' AS high
FROM tadir
WHERE pgmid = 'R3TR' AND object = 'FUGR' AND devclass = @devclass
INTO TABLE @prog_range.
SELECT name
FROM trdir
WHERE name IN @prog_range
ORDER BY name
INTO TABLE @DATA(programs).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |