Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Deleting of Files Dynamically

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Deleting of Files Dynamically
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    Post subject: Reply to: Deleting of Files Dynamically
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: 205
Location: Bangalore

PostPosted: Thu Oct 04, 2007 2:07 pm    Post subject: Reply to: Deleting of Files Dynamically
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: Chennai

PostPosted: Fri Oct 05, 2007 6:14 pm    Post subject:
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: 2150
Location: At my coffee table

PostPosted: Fri Oct 05, 2007 6:22 pm    Post subject: Re: Deleting of Files Dynamically
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: 205
Location: Bangalore

PostPosted: Fri Oct 05, 2007 6:51 pm    Post subject: Reply to: Deleting of Files Dynamically
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: 2360
Location: Israel

PostPosted: Sat Oct 06, 2007 4:09 am    Post subject:
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: 205
Location: Bangalore

PostPosted: Mon Oct 08, 2007 3:16 pm    Post subject: Reply to: Deleting of Files Dynamically
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts FTP Skip or ignore error and process ... AJAYREDDY All Other Mainframe Topics 3 Wed Sep 27, 2017 8:12 pm
No new posts Comparing 2 Files using Current time arunsoods SYNCSORT 9 Fri Sep 22, 2017 6:00 pm
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts Join records from 2 files with No Dup... Poha Eater DFSORT/ICETOOL 22 Sun Aug 27, 2017 10:35 pm
No new posts Changing sort Card Dynamically vickey_dw DFSORT/ICETOOL 5 Sat Aug 19, 2017 2:33 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us