IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to get the file name in which the command was issued?


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
karthikr44

Active User


Joined: 25 Aug 2007
Posts: 235
Location: Chennai

PostPosted: Wed Aug 20, 2008 6:48 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Aug 20, 2008 6:52 pm
Reply with quote

Yes, it is possible
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Aug 20, 2008 6:56 pm
Reply with quote

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
View user's profile Send private message
karthikr44

Active User


Joined: 25 Aug 2007
Posts: 235
Location: Chennai

PostPosted: Wed Aug 20, 2008 7:17 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Aug 20, 2008 7:20 pm
Reply with quote

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
View user's profile Send private message
karthikr44

Active User


Joined: 25 Aug 2007
Posts: 235
Location: Chennai

PostPosted: Wed Aug 20, 2008 7:27 pm
Reply with quote

HI enrico-sorichetti,

Thanks for ur quick reply. Now i understood.

Regards
R KARTHIK.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Wed Aug 20, 2008 7:31 pm
Reply with quote

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
View user's profile Send private message
karthikr44

Active User


Joined: 25 Aug 2007
Posts: 235
Location: Chennai

PostPosted: Wed Aug 20, 2008 7:36 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts RACF - Rebuild SETROPTS command which... All Other Mainframe Topics 3
Search our Forums:

Back to Top