View previous topic :: View next topic |
Author |
Message |
Sarangadhar Beginner
Joined: 14 Oct 2004 Posts: 130 Topics: 43 Location: virtual village
|
Posted: Mon Dec 06, 2004 3:02 pm Post subject: Copyinf files in REXX program |
|
|
Hi,
I want to copy PS to another PS since Rename command is failed in my system. Can any one suggest how to copy. _________________ Thanks |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Mon Dec 06, 2004 3:14 pm Post subject: |
|
|
Sarangadhar,
Quote: |
since Rename command is failed in my system
|
What do you mean it rename command failed? post the error code.
Also is there any special reason that you want to use rexx to copy the ps? why don't you use a IEBGENER, IDCAMS or SORT?
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
Sarangadhar Beginner
Joined: 14 Oct 2004 Posts: 130 Topics: 43 Location: virtual village
|
Posted: Mon Dec 06, 2004 3:25 pm Post subject: |
|
|
Kolusu,
Rename commandin REXX program is returning RC=8. It had been working for 2 years, but not from 1 month. May be some system profiles changed. So I planned to copy.
Why I chosed REXX only: I wanted to copy files that start with 2 qualifiers like
all/n files QUAL1.QUAL2.* to some mentioned datasets.
Earlier program renames all existing n files QUAL1.QUAL2.* to some other qualifiers names due to access problems. Now it's not working. Even my TSO RENAME command is not working now.
I already have REXX program to identify n files of that qualifiers. I just wanted copy/rename them. _________________ Thanks |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Mon Dec 06, 2004 3:32 pm Post subject: |
|
|
Sarangadhar,
Run the following rename job and look for the error messages in SYSTSPRT sysout.
Code: |
//STEP0100 EXEC PGM=IKJEFT01,DYNAMNBR=20
//SYSTSPRT DD SYSOUT=*,DCB=BLKSIZE=121
//SYSPRINT DD SYSOUT=*
//SYSTSOUT DD SYSOUT=*
//SYSTSIN DD *
REN 'YOUR ORGINAL DATASET'-
'YOUR RENAME DATASET'
/*
|
Quote: |
Why I chosed REXX only: I wanted to copy files that start with 2 qualifiers like
all/n files QUAL1.QUAL2.* to some mentioned datasets.
|
Did you try ADRDSSU utility?
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
Sarangadhar Beginner
Joined: 14 Oct 2004 Posts: 130 Topics: 43 Location: virtual village
|
Posted: Mon Dec 06, 2004 3:52 pm Post subject: |
|
|
Kolusu,
Renaming job is working fine.
I think ADRDSSU is used to copy data from one DASD volume to another.
(I don't know the last qualifier of the files, I know only 1st and 2nd qualifiers of source files to get renames, because it is a general program) _________________ Thanks |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
|
Back to top |
|
 |
Sarangadhar Beginner
Joined: 14 Oct 2004 Posts: 130 Topics: 43 Location: virtual village
|
Posted: Mon Dec 06, 2004 4:20 pm Post subject: |
|
|
Kolusu,
Is there any way to supply input file names to this JCL from a file which contain fiels names of all files to get renamed?
//STEP0100 EXEC PGM=IKJEFT01,DYNAMNBR=20
//SYSTSPRT DD SYSOUT=*,DCB=BLKSIZE=121
//SYSPRINT DD SYSOUT=*
//SYSTSOUT DD SYSOUT=*
//SYSTSIN DD *
REN 'dsname1'-
'dsname2'
//* _________________ Thanks |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Mon Dec 06, 2004 4:21 pm Post subject: |
|
|
Sarangadhar,
Quote: |
Is there any way to supply input file names to this JCL from a file which contain fiels names of all files to get renamed?
|
Can you explain in detail as to what you are trying to do ? You can multiple rename cards like as shown below
Code: |
//SYSTSIN DD *
REN 'dsname1'-
'dsname2'
REN 'dsname3'-
'dsname4'
REN 'dsname5'-
'dsname6'
...
/*
|
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
Sarangadhar Beginner
Joined: 14 Oct 2004 Posts: 130 Topics: 43 Location: virtual village
|
Posted: Mon Dec 06, 2004 4:26 pm Post subject: |
|
|
kOLUSU,
I can't have the filenames exactly, last qualifiers get changes daily. I can have only 1st and 2nd qualifiers. I want to rename/copy these to other names. Target name is fixed one, I can give exactly.
Here is my situation: There are 7 files coming daily from some other application, I wanted to get rename these 7 files. I know only 1st and 2nd qualifiers of these 7 input files. 3rd qualifier get changes daily. _________________ Thanks |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Tue Dec 07, 2004 8:59 am Post subject: |
|
|
Sarangdhar,
You can use ADRDSSu for renaming with partial qualifiers. Check the link above which explains about renaming the datasets with partial qualifier list.
Thanks
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
|
|