View previous topic :: View next topic
|
Author |
Message |
karthikr44
Active User
Joined: 25 Aug 2007 Posts: 235 Location: Chennai
|
|
|
|
HI,
Is it possible to get the file name in which the command was issued?
For example i issue command OPEN in command line. Now it is possible to get the file name DEV2.RK.JCL from that window where the command was issued.
Code: |
File Edit Edit_Settings Menu Utilities Compilers Test Help
sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
VIEW DEV2.RK.JCL(ALLDUPS) - 01.01 Columns 00001 00072
Command ===> open Scroll ===> CSR
****** ***************************** Top of Data ******************************
003600 //SORTXSUM JOB (053T,1531),'SORT',CLASS=A,MSGCLASS=X,
003700 // NOTIFY=&SYSUID
003710 //* INPUT:
003720 //* WDCP TR WDCP WDCP ID
003730 //* ID SSN NOD ID GUAR AGCY
|
Regards
R KARTHIK |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Yes, it is possible |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
certainly yes, if the command is an edit/view macro...
after the usual housekeeping ...
Code: |
Address ISREDIT "(DATASET) = DATASET" |
will fill the DATASET Rexx variable with the dataset name currently being edited/viewed |
|
Back to top |
|
|
karthikr44
Active User
Joined: 25 Aug 2007 Posts: 235 Location: Chennai
|
|
|
|
HI,
It worked.
Code: |
VIEW DEV2.RK.REXX.SOURCE(SAMP) - 01.12 Columns 00001 00072
Command ===> Scroll ===> CSR
****** ***************************** Top of Data ******************************
000001 /* REXX */
000002 ADDRESS ISREDIT MACRO
000003 "ISREDIT (DSNAME) = DATASET"
000004 SAY DSNAME
****** **************************** Bottom of Data ****************************
|
I have one question. When i issue command SAMP it displays the dataset name correctly. But when i issue command TSO SAMP it simply displays DSNAME.
Regards
R KARTHIK |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Quote: |
TSO SAMP it simply displays DSNAME. |
invoked in that way the ISREDIT environment is not available
since You did not check the return codes nothing showed up |
|
Back to top |
|
|
karthikr44
Active User
Joined: 25 Aug 2007 Posts: 235 Location: Chennai
|
|
|
|
HI enrico-sorichetti,
Thanks for ur quick reply. Now i understood.
Regards
R KARTHIK. |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
Quote: |
When i issue command SAMP it displays the dataset name correctly. But when i issue command TSO SAMP it simply displays DSNAME |
When you type "SAMP" from within View or Edit, ISPF gets control first and is able to relate the macro and the file being edited.
When you type "TSO SAMP", you bypass ISPF and go straight to TSO. That command will not even be aware that it has been executed from within an edited file. |
|
Back to top |
|
|
karthikr44
Active User
Joined: 25 Aug 2007 Posts: 235 Location: Chennai
|
|
|
|
HI Marso,
Quote: |
When you type "TSO SAMP", you bypass ISPF and go straight to TSO. That command will not even be aware that it has been executed from within an edited file.
|
Thanks for sharing the knowledge....
Regards
R KARTHIK |
|
Back to top |
|
|
|