| IBM MAINFRAME HELP & SUPPORT FORUMS Technical Forums for IBM Mainframe Applications like COBOL, JCL, CICS, DB2, FileAid, DFSORT, Endevor, Xpediter, CoolGen, CA-7&11, AbendAid, IMS, IDMS, PL/I, MqSeries, SyncSort, Assembler, ChangeMan, Easytrieve, InterTest, REXX, CLIST etc...
|
| View previous topic :: View next topic |
| Author |
Message |
karthikr44
Joined: 25 Aug 2007
Posts: 172
Location: Chennai
|
| Posted: Wed Aug 20, 2008 6:48 pm Post subject: How to get the file name in which the command was issued? |
|
|
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
Joined: 14 Mar 2007
Posts: 3544
Location: Brussels once more ...
|
| Posted: Wed Aug 20, 2008 6:52 pm Post subject: |
|
|
| Yes, it is possible |
|
| Back to top |
|
enrico-sorichetti
Joined: 14 Mar 2007
Posts: 3168
Location: italy
|
| Posted: Wed Aug 20, 2008 6:56 pm Post subject: Reply to: How to get the file name in which the command was |
|
|
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
Joined: 25 Aug 2007
Posts: 172
Location: Chennai
|
| Posted: Wed Aug 20, 2008 7:17 pm Post subject: Reply to: How to get the file name in which the command was |
|
|
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
Joined: 14 Mar 2007
Posts: 3168
Location: italy
|
| Posted: Wed Aug 20, 2008 7:20 pm Post subject: Reply to: How to get the file name in which the command was |
|
|
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
Joined: 25 Aug 2007
Posts: 172
Location: Chennai
|
| Posted: Wed Aug 20, 2008 7:27 pm Post subject: Reply to: How to get the file name in which the command was |
|
|
HI enrico-sorichetti,
Thanks for ur quick reply. Now i understood.
Regards
R KARTHIK. |
|
| Back to top |
|
Marso
Joined: 13 Mar 2006
Posts: 335
Location: Israel
|
| Posted: Wed Aug 20, 2008 7:31 pm Post subject: |
|
|
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
Joined: 25 Aug 2007
Posts: 172
Location: Chennai
|
| Posted: Wed Aug 20, 2008 7:36 pm Post subject: Reply to: How to get the file name in which the command was |
|
|
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 |
|
| |
THIS IS AN ARCIVE FORUM IN READ ONLY MODE. IF YOU WANT TO ASK YOUR DOUBTS USE THE ACTUAL FORUM
|