|
|
| Author |
Message |
aishwarya_singh
New User
Joined: 06 Apr 2005 Posts: 21
|
|
|
|
Hi,
Can we copy a dataset which is in TAPE unit ?Or Can we allocate a Dataset in TAPE instead of DASD? If so then what is the parameter for Unit in Rexx. Can anyone help me on this? |
|
| Back to top |
|
 |
References
|
|
 |
saithvis2
Active User
Joined: 23 Dec 2005 Posts: 62 Location: Providence , US
|
|
|
|
Hi Aishwarya,
Yes ! u can copy the data in a tape to a ps . But, why u want to use rexx for that ? it can be done by a simple jcl .
| Code: |
//COPY01 EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSUT1 DD DSN=P.AB.F111.CLW999.MTDBKP.G1184V00,DISP=SHR,
// UNIT=TAP8,VOL=SER=000249
//SYSUT2 DD DSN=XVZSTSO.TRY,DISP=(NEW,CATLG),
// SPACE=(CYL,(200,200),RLSE)
//SYSIN DD DUMMY
|
|
|
| Back to top |
|
 |
superk
Moderator Team Head
Joined: 26 Apr 2004 Posts: 3314 Location: Charlotte,NC USA
|
|
|
|
| I agree. REXX has no built-features for copying datasets, or for even allocating datasets (that's a function of the operating system environment). There are no REXX statements with regards to UNIT. |
|
| Back to top |
|
 |
aishwarya_singh
New User
Joined: 06 Apr 2005 Posts: 21
|
|
|
|
Actually i am preparing one rexx program which will copy BULK of Datasets into new datasets. Here i am using 'Like' keyword to allocate new datasets. But this program is running only for DASD datasets not for the datasets which are in TAPE.
It means there is no way in rexx where we can copy the TAPEC datasets to a new dataset.
Or
If we can copy a dataset in DASD to new dataset which will be in TAPE.
????????? |
|
| Back to top |
|
 |
superk
Moderator Team Head
Joined: 26 Apr 2004 Posts: 3314 Location: Charlotte,NC USA
|
|
|
|
You've completely lost me. REXX has no keyword "like". That sounds like a keyword parameter of a JCL DD statement, or of an operand of a TSO "ALLOCATE" command or of an IDCAMS "ALLOCATE" command.
TSO users cannot normally allocate datasets onto TAPE unless they have been given special tape mount authority by the Sys Admins. Batch jobs, which I presume we are talking about here, should have no problems allocating TAPE datasets. |
|
| Back to top |
|
 |
aishwarya_singh
New User
Joined: 06 Apr 2005 Posts: 21
|
|
|
|
Hi,
I am using this code:-
| Code: |
TRACE O
ADDRESS ISPEXEC
STATUS = MSG('OFF')
'CONTROL ERRORS RETURN'
CNT = 1
CPCNT = 0
GCCHKDS1='''XXXXXX.BULKCOPY.INPUT'''/*DATASET WHICH CARRIES I/P FILENAMES*/
GCCHKDS2='''XXXXXX.BULKCOPY.OUTPUT'''/*DATASET WHICH CARRIES O/P FILENAMES*/
ADDRESS TSO 'ALLOC FI(DDN1) DA('GCCHKDS1') SHR KEEP'
ADDRESS TSO 'EXECIO * DISKR DDN1(STEM PSNAM1. FINIS)'
ADDRESS TSO 'FREE F(DDN1)'
ADDRESS TSO 'ALLOC FI(DDN2) DA('GCCHKDS2') SHR KEEP'
ADDRESS TSO 'EXECIO * DISKR DDN2(STEM PSNAM2. FINIS)'
ADDRESS TSO 'FREE F(DDN2)'
DO WHILE (CNT < PSNAM1.0) | (CNT = PSNAM1.0)
PSNI = STRIP(PSNAM1.CNT)
PSNO = STRIP(PSNAM2.CNT)
CDSN = "'"PSNI"'"
IDSN = "'"PSNI"'"
ODSN = "'"PSNO"'"
IF SYSDSN(CDSN) <> 'OK'
then
do
Say "DATASET "PSNI" NOT FOUND!!"
CNT = CNT + 1
Iterate
end
ADDRESS TSO
"ALLOC DA("ODSN") LIKE("IDSN") NEW"
IF RC > 0
then
do
say "Allocation failed for dataset: " PSNO
CNT = CNT + 1
iterate
end
ADDRESS TSO 'ALLOC FI(INDDN) DA('IDSN') SHR KEEP'
ADDRESS TSO 'ALLOC FI(ODDN) DA('ODSN') SHR KEEP'
ADDRESS TSO 'EXECIO * DISKR INDDN(STEM RECS. FINIS)'
ADDRESS TSO 'FREE F(INDDN)'
'EXECIO' RECS.0 'DISKW' ODDN '(STEM RECS. FINIS)'
SAY 'FILE 'PSNI' COPIED TO 'PSNO' SUCCESSFULLY'
CPCNT = CPCNT + 1
ADDRESS TSO 'FREE F(ODDN)'
CNT = CNT + 1
END
SAY CPCNT' files copied.'
EXIT
|
There is LIKE keyword in Rexx also.....This code is not working for tape. |
|
| Back to top |
|
 |
superk
Moderator Team Head
Joined: 26 Apr 2004 Posts: 3314 Location: Charlotte,NC USA
|
|
|
|
So, your code appears to be a REXX exec with REXX, ISPF, and TSO commands inter-mixed.
The one line that appears to be relevant is the TSO command:
"ALLOC DA("ODSN") LIKE("IDSN") NEW"
If you use the Help on the TSO ALLOCATE command (TSO HELP ALLOCATE), you will find that you can specify a UNIT(XXX) parameter, as well as other parameters such as LABEL(XXX) and VOLUME(XXX).
When I attempt something like what you are doing, I get the error:
IKJ56221I VOLUME NECESSARY TO SATISFY YOUR REQUEST NOT ON SYSTEM, AND CANNOT BE MOUNTED
since, as I mentioned previously, I don't have MOUNT authority under TSO. |
|
| Back to top |
|
 |
|
|