Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Filename Edit from 3.4 console

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
rookie 1987

New User


Joined: 29 Oct 2014
Posts: 7
Location: India

PostPosted: Thu Oct 30, 2014 5:04 pm    Post subject: Filename Edit from 3.4 console
Reply with quote

In ISPF 3.4 panel after pressing enter, I want to execute a command by the side of the file name which would change the first qualifier of the file and replace it with my User ID.

I have got the file name from the console window and I need to manipulate the file name and create the output file as below. Is this possible.

For example : XXX.CCC.FFF is the file

(MYID).CCC.FFF should be the output file.


Thank you
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: Thu Oct 30, 2014 5:28 pm    Post subject:
Reply with quote

Yes, it is possible. Something I have done before but don't have access to the MF for this contract so can't test anything.

BEWARE - Only if you are absolutely certain that the same user catalog is related to both aliases should you use the RENAME command.
OTHERWISE perform a copy to the new dataset name and only when that has completed perform the DELETE of the original dataset.
Back to top
View user's profile Send private message
rookie 1987

New User


Joined: 29 Oct 2014
Posts: 7
Location: India

PostPosted: Thu Oct 30, 2014 5:52 pm    Post subject:
Reply with quote

Will you please throw some light on how to identify and delete the first qualifier of the file . I believe we can achieve it by WORD function in REXX. Any similar function that can be used here to achieve it ?

Thank you
Back to top
View user's profile Send private message
prino

Active Member


Joined: 07 Feb 2009
Posts: 982
Location: Oostende, Belgium

PostPosted: Thu Oct 30, 2014 6:07 pm    Post subject:
Reply with quote

Code:
hlq = word(translate(dsname, '.', ' '), 1)
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: Thu Oct 30, 2014 6:09 pm    Post subject:
Reply with quote

Look at the ALTER command entered on the DSN line from 3.4

However, as stated earlier check the "alias relates" to avoid potential catalog mismatch problems.
Back to top
View user's profile Send private message
rookie 1987

New User


Joined: 29 Oct 2014
Posts: 7
Location: India

PostPosted: Thu Oct 30, 2014 6:54 pm    Post subject:
Reply with quote

Robert ,

I believe your code works in REXX.
I am getting the filename dynamically from 3.4 panel

PROC 1 DSN
SET hlq = word(translate(&DSN, '.', ' '), 1) - this doesn't work

Hence this doesn't work. Any other ways to accomplish my requirement.

Thank you
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1712
Location: UK

PostPosted: Thu Oct 30, 2014 7:05 pm    Post subject: Reply to: Filename Edit from 3.4 console
Reply with quote

I am not sure what a 'console window' is but why not use the Rename command available in 3.4 (paying heed to the caveats written about by Expat).

You never mentioned actually writing a program to do this but as you are - why are you using CLIST and not Rexx?
Back to top
View user's profile Send private message
rookie 1987

New User


Joined: 29 Oct 2014
Posts: 7
Location: India

PostPosted: Thu Oct 30, 2014 7:41 pm    Post subject:
Reply with quote

By Console window , I meant after 3.4, giving the dataset and pressing enter, the window that I get

I'm trying to get the file name from 3.4 , rather than executing a REXX(say TSO rexx command). I prefer getting the file name and use it for manipulation downstream.

Suppose somebody gets to 3.4 and type this command, he should perform the operation seamlessly rather than give a TSO command.

Thank you
Back to top
View user's profile Send private message
prino

Active Member


Joined: 07 Feb 2009
Posts: 982
Location: Oostende, Belgium

PostPosted: Thu Oct 30, 2014 7:45 pm    Post subject:
Reply with quote

Ever thought about pressing PF1 when on the 3.4 screen, and then selecting option 2?

Code:
 TUTORIAL--------- DISPLAYED LIST - TSO COMMANDS/CLISTS/EXECS ----------TUTORIAL
 COMMAND ===>

   You can use TSO commands and CLISTs as data set list line commands.

   For example, if you specify the TSO command LIST to the left of data
   set USER.TEST.DATA, the effect will be the same as if you had entered
   TSO LIST 'USER.TEST.DATA' on the COMMAND line.

   The quoted fully-qualified data set name will be appended to the line
   command during command expansion unless either the '/' character is used
   or the unquoted fully-qualified data set name is the first argument of
   the command.

   If a TSO command, CLIST, or REXX exec issues a return code greater
   than or equal to 8, processing will stop and an error message will be
   displayed.

                           (continued on next page)
Back to top
View user's profile Send private message
rookie 1987

New User


Joined: 29 Oct 2014
Posts: 7
Location: India

PostPosted: Thu Oct 30, 2014 7:58 pm    Post subject:
Reply with quote

Very much

I know the rename works either ways but my requirement is to delete the first qualifier and then replace with my Userid.

Thank you
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1218
Location: Israel

PostPosted: Thu Oct 30, 2014 8:09 pm    Post subject:
Reply with quote

rookie 1987 wrote:
Will you please throw some light on how to identify and delete the first qualifier of the file.
PARSE will make it easier (supposing it's rexx):
Code:
parse var dsname oldhlq '.' whatsleftofthedsname
newdsname = userid()'.'whatsleftofthedsname


rookie 1987 wrote:
By Console window , I meant after 3.4, giving the dataset and pressing enter, the window that I get
Place "smiley tearing his hair off" here.
Back to top
View user's profile Send private message
rookie 1987

New User


Joined: 29 Oct 2014
Posts: 7
Location: India

PostPosted: Thu Oct 30, 2014 8:57 pm    Post subject:
Reply with quote

Thanks Marso, I have the rexx code with me that works but just wanted to accomplish this by combination of tso commands.

Thank you
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 645
Location: Pennsylvania

PostPosted: Thu Oct 30, 2014 11:27 pm    Post subject:
Reply with quote

From the American movie Cool Hand Luke:
What we've got here is a failure to communicate

I know there is a language barrier, but this is the most non-understandable statement ever:


Quote:
By Console window , I meant after 3.4, giving the dataset and pressing enter, the window that I get

I'm trying to get the file name from 3.4 , rather than executing a REXX(say TSO rexx command). I prefer getting the file name and use it for manipulation downstream.

Suppose somebody gets to 3.4 and type this command, he should perform the operation seamlessly rather than give a TSO command


What dataset are you giving? They are all listed on the screen
Manipulating downstream where?
Type what command?

You need to hit the books and understand how Rexx and TSO commands work.



Quote:
Thanks Marso, I have the rexx code with me that works but just wanted to accomplish this by combination of tso commands.


If you have a Rexx that works, then what do you want that is different?

icon_cry.gif
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2019
Location: Silicon Valley

PostPosted: Fri Oct 31, 2014 8:47 pm    Post subject: Reply to: Filename Edit from 3.4 console
Reply with quote

Quote:
I know the rename works either ways but my requirement is to delete the first qualifier and then replace with my Userid.


Can you clarify your requirement? 'Replacing the the HLQ with your userid' sound very much like you want to rename the data set. If you do not want to rename the data set, where do you want the replacing to occur?
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2019
Location: Silicon Valley

PostPosted: Fri Oct 31, 2014 8:51 pm    Post subject: Reply to: Filename Edit from 3.4 console
Reply with quote

Quote:
I believe your code works in REXX.
I am getting the filename dynamically from 3.4 panel

PROC 1 DSN
SET hlq = word(translate(&DSN, '.', ' '), 1) - this doesn't work

Hence this doesn't work. Any other ways to accomplish my requirement.

It does not work because you are adding rexx syntax into a CLIST. The 'other way' you ask for is to actually use a rexx program instead of a clist.
Back to top
View user's profile Send private message
rookie 1987

New User


Joined: 29 Oct 2014
Posts: 7
Location: India

PostPosted: Sun Nov 02, 2014 10:43 am    Post subject: Re: Reply to: Filename Edit from 3.4 console
Reply with quote

Thank you and that worked
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1445
Location: Azeroth

PostPosted: Mon Nov 03, 2014 12:54 am    Post subject: Reply to: Filename Edit from 3.4 console
Reply with quote

Quote:
BEWARE - Only if you are absolutely certain that the same user catalog is related to both aliases should you use the RENAME command.


Hello, Could you please explain why this should not be done?
I have done a lot of renames in my career without knowing the above precaution. And I have not run into any problems doing so. Or atleast I was not noticing that I was messing up the catalog.
Any layman explanation is welcome.

Thank you,
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: Mon Nov 03, 2014 3:11 pm    Post subject:
Reply with quote

I believe that this may have been fixed in later releases, but when you did a rename in 3.4 the original dataset was catalog'd in a user catalog and upon rename was left in the original catalog, which may not have the alias from the master catalog pointing to that catalog.

Caused quite a few problems many years ago
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1445
Location: Azeroth

PostPosted: Mon Nov 03, 2014 4:25 pm    Post subject:
Reply with quote

Hello Expat,
I renamed one of my user dataset and changed it to some other HLQ.
The dataset usercat automatically switched to the new HLQ's usercat.

Guess the issue has been fixed.

Regards,
Vasanth.S
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 How to display value of an exit param... lind sh CICS 2 Sun Oct 09, 2016 12:28 pm
No new posts Use of Edit & FTOV migusd SYNCSORT 3 Wed Jun 08, 2016 1:49 am
No new posts How storage is calculated for AN-Edit... Raghu navaikulam COBOL Programming 2 Wed Mar 09, 2016 3:51 pm
No new posts SDSF REXX - Console command with ' vasanthz CLIST & REXX 2 Thu Feb 18, 2016 11:35 pm
No new posts Too many edit macro's and too few PF ... don.leahy TSO/ISPF 7 Wed Feb 17, 2016 3:00 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us