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

Delete record or Reset RC code using File Aid.


IBM Mainframe Forums -> Compuware & Other Tools
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
mpawan
Warnings : 2

New User


Joined: 03 Nov 2008
Posts: 42
Location: Pune

PostPosted: Tue Jul 26, 2016 3:52 pm
Reply with quote

I have a requirement to create a JCL with FileAid commands to read a Input file and once read delete the content of the file so that next read of the file should give RC as 8.

Could you please help.
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Tue Jul 26, 2016 4:23 pm
Reply with quote

What are you trying to achieve here? Could you please elaborate?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Tue Jul 26, 2016 6:19 pm
Reply with quote

Questions that come to mind upon reading your post:
1. Why do you need to read the data set before deleting the records?
2. What program or utility are you expecting to get RC 8 with?
3. Why do you have to use File Aid?
4. Why, after almost 8 years on this forum, do you call it a "file"? z/OS has tape files and Unix System Services files -- everything else is a data set.

The quick and easy way to delete the records in the data set is to use IEBGENER with SYSUT1 DD DUMMY and SYSUT2 being the data set. No, it does not use File Aid and no it does not read the records before deleting them, but it will remove all records. And you may -- or may not -- get RC 8 depending, again, upon what program you are using to read the data set.
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3051
Location: NYC,USA

PostPosted: Tue Jul 26, 2016 9:16 pm
Reply with quote

Quote:
I have a requirement to create a JCL with FileAid commands to read a Input file and once read delete the content of the file so that next read of the file should give RC as 8.
You can simply delete and recreate same file and SET RC 8.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Thu Jul 28, 2016 8:12 pm
Reply with quote

If you are doing more than described and file aid provides that facility then do your file aid stuff but choose batch instead of online and edit the job before submission to produce a JCL error so that you now have the first part of your requirement.
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 -> Compuware & Other Tools

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 1
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts DELETE SPUFI DB2 1
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top