Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to get the file name in which the command was issued?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
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    Post subject: How to get the file name in which the command was issued?
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: 8593
Location: Back in jolly old England

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

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

Global Moderator


Joined: 14 Mar 2007
Posts: 10326
Location: italy

PostPosted: Wed Aug 20, 2008 6:56 pm    Post subject: Reply to: How to get the file name in which the command was
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    Post subject: Reply to: How to get the file name in which the command was
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10326
Location: italy

PostPosted: Wed Aug 20, 2008 7:20 pm    Post subject: Reply to: How to get the file name in which the command was
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    Post subject: Reply to: How to get the file name in which the command was
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: 1243
Location: Israel

PostPosted: Wed Aug 20, 2008 7:31 pm    Post subject:
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    Post subject: Reply to: How to get the file name in which the command was
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    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am
No new posts MQ command in option 6 of ISPF! Vignesh Sid All Other Mainframe Topics 3 Tue Sep 26, 2017 6:01 pm
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us