Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Delete record or Reset RC code using File Aid.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Compuware & Other Tools
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    Post subject: Delete record or Reset RC code using File Aid.
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

Moderator


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

PostPosted: Tue Jul 26, 2016 4:23 pm    Post subject:
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: 7936
Location: Bellevue, IA

PostPosted: Tue Jul 26, 2016 6:19 pm    Post subject:
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

Senior Member


Joined: 21 Sep 2010
Posts: 1625
Location: NY,USA

PostPosted: Tue Jul 26, 2016 9:16 pm    Post subject:
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: 1722
Location: UK

PostPosted: Thu Jul 28, 2016 8:12 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> Compuware & Other Tools All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts How to Capture the Max return code of... anilkumar922 All Other Mainframe Topics 0 Thu Jan 12, 2017 12:02 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts PL/I code tuning/Performance improvement Virendra Shambharkar PL/I & Assembler 4 Mon Dec 05, 2016 11:57 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us