The DBA was unable to get the SQL extracted using DCOPY command in ISQL Online SQL Execution, SQL Editor.
IQPSQLE1 --- (CAPS ON) --- SQL Editor --- (NULLS ON) --- 2020/01/14 07:47:57
COMMAND ===> DCOPY 'RAUJO02.DB2.JCL(MEMBER1)' SCROLL ===> CSR
Edit the SQL statements that you wish to test below. When you are done
editing the SQL, hit PF3/15 or enter 'END' to return to the RC/SQL control
panel. Host variables will be parsed out, so that you may test your SQL
repeatedly with various host values.
a__
___ SELECT * FROM SYSIBM.SYSTABLES
___ WHERE NAME = 'SYSCOPY' ;
b__
******************************* BOTTOM OF DATA ********************************
And you get the result:
IQPSQLE1 --- (CAPS ON) --- SQL Editor --- (NULLS ON) --- 2020/01/14 07:48:58
COMMAND ===> SCROLL ===> CSR
Edit the SQL statements that you wish to test below. When you are done
editing the SQL, hit PF3/15 or enter 'END' to return to the RC/SQL control
panel. Host variables will be parsed out, so that you may test your SQL
repeatedly with various host values.
___
___
___ SELECT * FROM SYSIBM.SYSTABLES
___ WHERE NAME = 'SYSCOPY' ;
___
******************************* BOTTOM OF DATA ********************************
PT508I: DCOPY command processed successfully.
Note a blank line was added just before the SELECT statement because of the A in line command, but the SQL statement was not copied over and MEMBER1 was empty.
Release : 20.0
Component : Interactive SQL
To work with SQL Editor and copy/move data to/from a data set or member you have three commands available.
DCOPY - Copy a member of a PDS or a sequential dataset
DCREATE - Create a new member of a PDS
DREPLACE - Replace a member of a PDS or a sequential dataset
The DCOPY command will copy a member of a PDS or a sequential data set to the SQL Editor, so only A (after) and B (before) are allowed in the line command.
To copy the SELECT statement to a PDS member you have to work with DCREATE or DREPLACE commands, with these commands you can work with an "M", "C", a set of "MM" or "CC" in the line command to get the expected results.