IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Deleting of Files Dynamically


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
shafi312

New User


Joined: 28 Dec 2006
Posts: 1
Location: pune

PostPosted: Thu Oct 04, 2007 1:08 pm
Reply with quote

Hi
I'm trying to delete files using IEFBR14 but i want to do that dynamically using symbolic parameters but its giving error as below.

2 IEFC630I UNIDENTIFIED KEYWORD CNTRY
3 IEFC627I INCORRECT USE OF AMPERSAND IN THE DSN FIELD

the JCL is as below
//REVERSE EXEC PGM=IEFBR14,
// CNTRY=BPM.PAR
//DD1 DD DSN=INT.PROD.UQ14052.&CNTRY(+0),DISP=(OLD,DELETE,DELETE),

is there any way which can be used or any other Utility which will meet my purpose
Back to top
View user's profile Send private message
silentarya

New User


Joined: 11 Mar 2007
Posts: 35
Location: Chennai

PostPosted: Thu Oct 04, 2007 2:05 pm
Reply with quote

I have not tried it ... But still u can try using 2 periods(.) instead of 1.

//DD1 DD DSN=INT.PROD.UQ14052..&CNTRY(+0),DISP=(OLD,DELETE,DELETE),
Back to top
View user's profile Send private message
Ajay Baghel

Active User


Joined: 25 Apr 2007
Posts: 206
Location: Bangalore

PostPosted: Thu Oct 04, 2007 2:07 pm
Reply with quote

Hi Shafi,

The way you are providing the value of the symbolic parameter is incorrect. You can use symbolic parameters in Procedures only (both instream and catalogued). And you provide the value for them in the job-step which is calling that proc.

In your case, the correct way would be(in case your proc is catalagued:
//yourproc PROC
//REVERSE EXEC PGM=IEFBR14,
//DD1 DD DSN=INT.PROD.UQ14052.&CNTRY(+0),DISP=(OLD,DELETE,DELETE),
.
.
// PEND

The job-step executing the above proc yourproc should be:
//jobstep EXEC yourproc ,CNTRY=BPM.PAR


Thanks,
Ajay
Back to top
View user's profile Send private message
hemanth.nandas

Active User


Joined: 18 Aug 2007
Posts: 120
Location: India

PostPosted: Fri Oct 05, 2007 6:14 pm
Reply with quote

Hi All,

Quote:
2 IEFC630I UNIDENTIFIED KEYWORD CNTRY
3 IEFC627I INCORRECT USE OF AMPERSAND IN THE DSN FIELD

the JCL is as below
//REVERSE EXEC PGM=IEFBR14,
// CNTRY=BPM.PAR
//DD1 DD DSN=INT.PROD.UQ14052.&CNTRY(+0),DISP=(OLD,DELETE,DELETE),


Above statements are itself wrong, as shafi said is correct, but there is something wrong in code

Quote:
//DD1 DD DSN=INT.PROD.UQ14052.&CNTRY(+0),DISP=(OLD,DELETE,DELETE),


Here in &CNTRY use one more . (period) as silentarya said in

Quote:
But still u can try using 2 periods(.) instead of 1.



Use Like this,

//PROC111 PROC,
// CNTRY=XXX.XX
//PS0010 EXEC PGM=IEFBR14
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=* ***MAY NOT REQ
//DELETDSN DD DSN=INT.PROD.UQ14052..&CNTRY(+0),
// DISP=(OLD,DELETE)

//SYSIN DD DUMMY
// PEND
//JS0010 EXEC PROC111,CNTRY=BPM.PAR
//
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Fri Oct 05, 2007 6:22 pm
Reply with quote

Try this:
Quote:
//REVERSE EXEC PGM=IEFBR14,
// SET CNTRY=BPM.PAR
//DD1 DD DSN=INT.PROD.UQ14052.&CNTRY(+0),DISP=(OLD,DELETE,DELETE),
Back to top
View user's profile Send private message
Ajay Baghel

Active User


Joined: 25 Apr 2007
Posts: 206
Location: Bangalore

PostPosted: Fri Oct 05, 2007 6:51 pm
Reply with quote

Note that SET keyword needs to be preceded by at least one space.
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Sat Oct 06, 2007 4:09 am
Reply with quote

Ajay Baghel -

You said "You can use symbolic parameters in Procedures only", but this is not true. You can use Symbolics in any JCL component (job or procedure). For more info, please refer to the fine manual.

O.
Back to top
View user's profile Send private message
Ajay Baghel

Active User


Joined: 25 Apr 2007
Posts: 206
Location: Bangalore

PostPosted: Mon Oct 08, 2007 3:16 pm
Reply with quote

Thanks Ofer.....


Quote:
You can code JCL symbols in:
JCL statements in the input job stream, submitted either in batch mode or from a TSO session (but not in the job stream read in in response to a START command)


says it all
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Merge two VSAM KSDS files into third ... JCL & VSAM 6
No new posts Joinkeys - 5 output files DFSORT/ICETOOL 7
Search our Forums:

Back to Top