Copy (Cloning) PS files



IBM's Command List programming language & Restructured Extended Executor

Copy (Cloning) PS files

Postby arthee82 » Wed Mar 25, 2009 2:13 am

Hi All,
I have very minimal experience working in Rexx. I have to write a tool that takes PS(flat file) as the input file and creates a copy of it every time i run.

For example (under 3.4 option), if i give say.

clone PWSX.S34562.FILE

The tool should copy of the dataset as PWSX.S34562.FILE.COPY1
When i run the tool again, it should generate PWSX.S34562.FILE.COPY2

Can you please list me various steps/Pseudo code, so that i can achieve to do the following

1. Steps for invoking IEBGENER from Rexx.
2. Process to create a rexx executable.
3. To make it called from ISPF option 3.4

Thanks

Arthi. N
arthee82
 
Posts: 3
Joined: Wed Mar 25, 2009 1:56 am
Has thanked: 0 time
Been thanked: 0 time

Re: Copy (Cloning) PS files

Postby MrSpock » Wed Mar 25, 2009 2:31 am

arthee82 wrote:I have very minimal experience working in Rexx.


That's OK, but what's more important here is what kind of experience you have working in TSO and ISPF?
User avatar
MrSpock
Global moderator
 
Posts: 807
Joined: Wed Jun 06, 2007 9:37 pm
Location: Raleigh NC USA
Has thanked: 0 time
Been thanked: 4 times

Re: Copy (Cloning) PS files

Postby arthee82 » Wed Mar 25, 2009 1:34 pm

I have over 5 years of experience in tso, ispf. I have been trying for posting this question in ibmmainframes.com, but my username never got authorised and hence i had to post my question here.
arthee82
 
Posts: 3
Joined: Wed Mar 25, 2009 1:56 am
Has thanked: 0 time
Been thanked: 0 time

Re: Copy (Cloning) PS files

Postby MrSpock » Wed Mar 25, 2009 3:23 pm

OK, then I'll try.

Well, you mention that you want to invoke this as a command from the ISPF 3.4 (DSLIST) panel. Based on that, then we know that you have both the TSO and ISPF environments available, so you'll want to take advantage of them.

Notice on the help panel for the ISPF 3.4 panel that it mentions, for the COMMAND line for each dataset listed, in addition to the commands it supports, that you can also enter a TSO command, REXX exec or Clist. Note that it also mentions that the dataset listed will be passed to that command as a parameter. You'll actually be writing very little of this process in actual REXX.

So, to review your questions at a high level:

Can you please list me various steps/Pseudo code, so that i can achieve to do the following

1. Steps for invoking IEBGENER from Rexx.

This would be done the exact same way that you would invoke IEBGENER from TSO. How do you plan on controlling the name of the additional qualifier (i.e. COPY1, COPY2, etc.) if it varies from one execution to another?

2. Process to create a rexx executable.

I'm not sure what you mean by this. REXX is executable via the REXX interpreter which is native to the TSO environment. Are you going to compile your REXX code?

3. To make it called from ISPF option 3.4

Your REXX code is going to have to be made available to your TSO/ISPF command libraries. If the REXX exec will be run in interpreted mode, then it needs to reside in a proper library that's resident to your TSO session. Where specifically that is depends on your site's standards. It may reside in a library allocated to the SYSPROC DD (CLIST or REXX), or in a library allocated to the SYSEXEC DD (REXX only). If you plan on compiling your exec, then the load library it is in will obviously have to be one that's already allocated to either your TSO session or ISPF session (i.e. the ISPLLIB DD).

I'll get you started in the right direction by giving you this:

I'm going to make the assumption that your CLONE exec will be run in standard interpreted mode, and will reside in a common PDS allocated to the SYSPROC DD for your TSO session.

/* REXX */
PARSE ARG THEDSN .
SAY THEDSN
THEDSN = ARG(1)
SAY THEDSN
EXIT 0


I'll let you decide if you prefer the PARSE ARG instruction, or if you'd rather use the ARG Built-in Function.
User avatar
MrSpock
Global moderator
 
Posts: 807
Joined: Wed Jun 06, 2007 9:37 pm
Location: Raleigh NC USA
Has thanked: 0 time
Been thanked: 4 times

Re: Copy (Cloning) PS files

Postby arthee82 » Thu Mar 26, 2009 2:57 am

Thanks a lot for the info. I shall let you know for the updates
arthee82
 
Posts: 3
Joined: Wed Mar 25, 2009 1:56 am
Has thanked: 0 time
Been thanked: 0 time


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post