MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Deleting A PDS and its members in a JOB( JCL + REXX Exp)

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
karunkallore
Beginner


Joined: 11 Dec 2004
Posts: 103
Topics: 39

PostPosted: Fri Feb 11, 2005 12:36 pm    Post subject: Deleting A PDS and its members in a JOB( JCL + REXX Exp) Reply with quote

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
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Fri Feb 11, 2005 1:16 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
dtf
Beginner


Joined: 10 Dec 2004
Posts: 110
Topics: 8
Location: Colorado USA

PostPosted: Fri Feb 11, 2005 1:21 pm    Post subject: Reply with quote

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
View user's profile Send private message
karunkallore
Beginner


Joined: 11 Dec 2004
Posts: 103
Topics: 39

PostPosted: Fri Feb 11, 2005 2:59 pm    Post subject: Apologies..!! Reply with quote

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
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Fri Feb 11, 2005 3:09 pm    Post subject: Reply with quote

karunkallore,

Quote:

ALso can you please tell me a way to allocate a PDS in the Rexx routine ??


This was answered in this topic

http://www.mvsforums.com/helpboards/viewtopic.php?t=3621

Hope this helps...

Cheers

kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
karunkallore
Beginner


Joined: 11 Dec 2004
Posts: 103
Topics: 39

PostPosted: Fri Feb 11, 2005 3:27 pm    Post subject: Thanks.. Reply with quote

Hi Kolsu,


It works !!!

Thank you very much !!


Reagrds,

Karun.
Back to top
View user's profile Send private message Send e-mail
karunkallore
Beginner


Joined: 11 Dec 2004
Posts: 103
Topics: 39

PostPosted: Fri Feb 11, 2005 5:01 pm    Post subject: A code for Review.... Reply with quote

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
View user's profile Send private message Send e-mail
karunkallore
Beginner


Joined: 11 Dec 2004
Posts: 103
Topics: 39

PostPosted: Fri Feb 11, 2005 5:11 pm    Post subject: Help in REXX PDS.. Reply with quote

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
View user's profile Send private message Send e-mail
karunkallore
Beginner


Joined: 11 Dec 2004
Posts: 103
Topics: 39

PostPosted: Fri Feb 11, 2005 6:08 pm    Post subject: Reply with quote

Thanks !!! for reading my query !!

It was qualification problem i got it so it worked.

Cheers
karun !!
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group