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 

Symbolic Parameter for IDCAMS DELETE command?

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
David Briars
Beginner


Joined: 03 Jul 2003
Posts: 5
Topics: 2

PostPosted: Thu Jul 03, 2003 2:22 pm    Post subject: Symbolic Parameter for IDCAMS DELETE command? Reply with quote

Greetings,

Could my IDCAMS DELETE command use a Symbolic Paramater?

For example, the following code:

Code:

//MYIDCRM JOB '6476,TEST,MYID','TEST TB-02',
//            CLASS=B,
//            NOTIFY=MYID,
//            MSGCLASS=T
//*-------------------------------------------
//   SET VERSION=TEST
//*-------------------------------------------
//DELT     EXEC PGM=IDCAMS
//SYSPRINT DD   SYSOUT=*
//SYSIN    DD   *
 DELETE MYID.FILE.&VERSION
//*-------------------------------------------
//S00BR14  EXEC PGM=IEFBR14
//CHECKIT  DD DSN=MYID.FILE.&VERSION,
//            DISP=(,CATLG,DELETE),
//            SPACE=(CYL,(2,1),RLSE)


gives a 'Dataset Name is Invalid' message on the IDCAMS DELETE command.

I'd like the dataset name to have a variable qualifier.

Is there a work arround?

Thank you for your consideration.

Regards,
Dave
[/quote]
_________________
===========================
David Briars
Sr. Applications Programmer
Northern Trust Company
Chicago, IL
David_Briars@ntrs.com
===========================
Back to top
View user's profile Send private message
Mike
Beginner


Joined: 03 Dec 2002
Posts: 114
Topics: 0
Location: Sydney, Australia

PostPosted: Thu Jul 03, 2003 6:58 pm    Post subject: Reply with quote

If your requirement is only to resolve the situation you have shown, whereby the job will fail with a JCL error if the dataset exists, then using DISP=(MOD,CATLG,DELETE) would solve your problem, without the need for the IDCAMS step.

Basically, without either modifying the JCL as most schedulers allow or utilising a program to change data according to the resolved symbolic, you cannot resolve symbolics within instream data. Such programs, that are around, basically have the symbolic passed to the program via the parm field and then change pre-defined string(s) to the resolved value of the symbolic.

Personally, if you're simply deteing a dataset, and then re-creating it, to effectively ensure that it is empty, I'd use a program that opens the dataset for output and then closes the dataset, without writing any data. IEBGENER can do this, as can IDCAMS.
_________________
Regards,
Mike.
Back to top
View user's profile Send private message
SureshKumar
Intermediate


Joined: 23 Jan 2003
Posts: 211
Topics: 21

PostPosted: Mon Jul 07, 2003 8:58 am    Post subject: Reply with quote

Dave,
Could my IDCAMS DELETE command use a Symbolic Paramater? - the answer is yes. You can use symbolics within IDCAMS.
Back to top
View user's profile Send private message
bablack
Beginner


Joined: 04 Dec 2002
Posts: 71
Topics: 0
Location: Little Falls, NJ

PostPosted: Mon Jul 07, 2003 11:42 am    Post subject: Reply with quote

Quote:
Could my IDCAMS DELETE command use a Symbolic Paramater? - the answer is yes. You can use symbolics within IDCAMS.

If you are saying that IDCAMS can use symbolics, I don't think so. There is nothing in the IDCAMS manual that implies you can and I just ran a quick test and it got a syntax error.

DELETE XYZ.&VERSION
IDC3203I ITEM 'XYZ.&VERSION' DOES NOT ADHERE TO RESTRICTIONS
IDC3202I ABOVE TEXT BYPASSED UNTIL NEXT COMMAND. CONDITION CODE IS 12


_________________
Bruce A. Black
Senior Software Developer
Innovation Data Processing
Back to top
View user's profile Send private message Send e-mail Visit poster's website
SureshKumar
Intermediate


Joined: 23 Jan 2003
Posts: 211
Topics: 21

PostPosted: Mon Jul 07, 2003 11:49 am    Post subject: Reply with quote

I am sorry, my mistake. I was actually moving the code thru Endevor and those symbolics were resolved before execution.
Back to top
View user's profile Send private message
taterhead
Beginner


Joined: 02 Dec 2002
Posts: 7
Topics: 0

PostPosted: Tue Jul 08, 2003 7:38 am    Post subject: Reply with quote

Use TSO:

Code:

//DELT     EXEC PGM=IKJEFT01,
// PARM='DELETE MYID.FILE.&VERSION'
Back to top
View user's profile Send private message
David Briars
Beginner


Joined: 03 Jul 2003
Posts: 5
Topics: 2

PostPosted: Wed Jul 09, 2003 9:09 am    Post subject: Reply with quote

Thank you Taterhead. Your solution worked A-OK.

As a followup: Could I delete more than one dataset using this technique?

As I read the TSO/E manual, it looks like I can only pass one DELETE command to TSO/E via PARM=. Often, I need to delete several datasets at one time (in one step).

Thank you again.

Regards,
Dave
_________________
===========================
David Briars
Sr. Applications Programmer
Northern Trust Company
Chicago, IL
David_Briars@ntrs.com
===========================
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) 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