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: 8666
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

Moderator


Joined: 14 Mar 2007
Posts: 10472
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

Moderator


Joined: 14 Mar 2007
Posts: 10472
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: 1277
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 Process file after 7 days of hold charlessxavier All Other Mainframe Topics 0 Tue May 22, 2018 3:54 pm
No new posts TRAILER3 is creating blank record in ... kodeesm DFSORT/ICETOOL 3 Fri May 18, 2018 5:45 pm
No new posts Transfer of mainframe file to PC in Z... maxsubrat JCL & VSAM 4 Thu May 17, 2018 11:35 am
No new posts Rexx command to open an another text ... Bharath Vikraman PC Guides & IT News 7 Sat May 12, 2018 4:34 pm
No new posts IBM Pcomm macro startmacro command do... JGregoire IBM Tools 0 Wed May 09, 2018 12:16 pm

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