View previous topic :: View next topic |
Author |
Message |
karunkallore Beginner
Joined: 11 Dec 2004 Posts: 103 Topics: 39
|
Posted: Fri Feb 11, 2005 12:36 pm Post subject: Deleting A PDS and its members in a JOB( JCL + REXX Exp) |
|
|
Dear Friends,
Scenario
-----------
I have a PDS and some members in it. The PDS is created on the FLY by a rexx routine and the members are created in it .
Then the REXX executes a Job-A which uses the members in the PDS created.
Help
-------
Can you please help me to write a Step in JOB-A at the end to delete the
PDS and all its memebers ?
Can you please help me to write part of REXX which creates a New PDS
on the fly in the beginning of the REXX routine ie after i submit the panel the PDS should be created with some parameters that i am passing from the Panel ?
All help would be greatly appreciated !!
Thanks
Karun |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Fri Feb 11, 2005 1:16 pm Post subject: |
|
|
Karun,
Do not post the same question in more than 1 forum. I deleted your duplicate post in the JCL forum.
You can add the following step as a last step in JOB-A to delete the pds created in the rexx
Code: |
//LASTSTEP EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DELETE 'YOUR PDS NAME'
/*
|
Hope this helps..
Cheers
kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
dtf Beginner
Joined: 10 Dec 2004 Posts: 110 Topics: 8 Location: Colorado USA
|
Posted: Fri Feb 11, 2005 1:21 pm Post subject: |
|
|
Or you could reference it as DISP=(OLD,DELETE,KEEP) in the step that uses it.
________
Ford Transcontinental
Last edited by dtf on Tue Feb 01, 2011 1:44 pm; edited 1 time in total |
|
Back to top |
|
|
karunkallore Beginner
Joined: 11 Dec 2004 Posts: 103 Topics: 39
|
Posted: Fri Feb 11, 2005 2:59 pm Post subject: Apologies..!! |
|
|
Hi Kolusu,
Sorry for the two posts. Why i posted in JCL and REXX is because it was pretaining to both.
Thank you for the solution. ALso can you please tell me a way to allocate
a PDS in the Rexx routine ??
Regards,
Karun |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
|
Back to top |
|
|
karunkallore Beginner
Joined: 11 Dec 2004 Posts: 103 Topics: 39
|
Posted: Fri Feb 11, 2005 3:27 pm Post subject: Thanks.. |
|
|
Hi Kolsu,
It works !!!
Thank you very much !!
Reagrds,
Karun. |
|
Back to top |
|
|
karunkallore Beginner
Joined: 11 Dec 2004 Posts: 103 Topics: 39
|
Posted: Fri Feb 11, 2005 5:01 pm Post subject: A code for Review.... |
|
|
Dear Friends,
I am trying to allocate a PDS in REXX with the following code :
/*KARUN NEW */
FILENAME = 'TSTA125.TEST.B'|| BATCHNO
NUMBER = 30
"ALLOCATE DATASET("FILENAME") NEW SPACE(10,20) DIR("NUMBER%6")",
"DSORG(PO) RECFM(V,B) LRECL(255) BLKSIZE(5100)"
IF RC > 0 THEN
SAY 'AN ERROR PREVENTED' FILENAME 'FROM BEING ALLOCATED.'
ELSE
SAY 'YOUR DATA SET' FILENAME 'HAS BEEN ALLOCATED.'
/*KARUN NEW */
I got it from a Manual. I tailor made it .
It is not working and it is giving me a 'AN ERROR PREVENTED' FILENAME 'FROM BEING ALLOCATED message.
Please help !!
Thanks,
Karun |
|
Back to top |
|
|
karunkallore Beginner
Joined: 11 Dec 2004 Posts: 103 Topics: 39
|
Posted: Fri Feb 11, 2005 5:11 pm Post subject: Help in REXX PDS.. |
|
|
Dear Friends,
I am trying to allocate a PDS in REXX with the following code :
/*KARUN NEW */
FILENAME = 'TSTA125.TEST.B'|| BATCHNO
NUMBER = 30
ADDRESS TSO
"ALLOCATE DATASET("FILENAME") NEW SPACE(10,20) DIR("NUMBER%6")",
"DSORG(PO) RECFM(V,B) LRECL(255) BLKSIZE(5100)"
IF RC > 0 THEN
SAY 'AN ERROR PREVENTED' FILENAME 'FROM BEING ALLOCATED.'
ELSE
SAY 'YOUR DATA SET' FILENAME 'HAS BEEN ALLOCATED.'
/*KARUN NEW */
In the previous code i had not Put
ADDRESS TSO.
Now it is working BUT....
I am not able to see the dataset in :-
1) Option 3.4 ( or DSU 3.4 )
2) In the same Rexx routine the following piece of code uses this same PDS to write members to it. The code is :-
ADDRESS ISPEXEC
"FTOPEN TEMP"
"FTINCL SCBSTKK1"
"FTCLOSE"
"VGET (ZTEMPF)"
ADDRESS TSO
/*KARUN */
SAY 'THE VALUE'
SAY ZTEMPF
TEMPF.=''
/* KARUN NEW */
/*DS_DUP='$.PPGBS.PRDSTK.B' || BATCHNO */
DS_DUP= FILENAME
/* KARUN NEW */
DS_DUP=DS_DUP||"(TESTLM)"
DS_TEMPF=ZTEMPF
CALL FALLOC(DS_TEMPF 'TEMPF.' '*' 'DISKR')
CALL FALLOC(DS_DUP 'TEMPF.' '*' 'DISKW')
/*********************************************************************/
FALLOC:
/*********************************************************************/
ADDRESS TSO
ARG DSX LNX LNIX OPTX
"ALLOC DD(DD01) DS('"DSX"') SHR REU"
"EXECIO "LNIX" "OPTX" DD01 (STEM "LNX" FINIS"
"FREE DD(DD01)"
RETURN
Now it saying dataset not found !!
Please help !!
Thanks,
Karun |
|
Back to top |
|
|
karunkallore Beginner
Joined: 11 Dec 2004 Posts: 103 Topics: 39
|
Posted: Fri Feb 11, 2005 6:08 pm Post subject: |
|
|
Thanks !!! for reading my query !!
It was qualification problem i got it so it worked.
Cheers
karun !! |
|
Back to top |
|
|
|
|