View previous topic :: View next topic
|
Author |
Message |
mpawan Warnings : 2 New User
Joined: 03 Nov 2008 Posts: 42 Location: Pune
|
|
|
|
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 |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
What are you trying to achieve here? Could you please elaborate? |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3054 Location: NYC,USA
|
|
|
|
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 |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
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 |
|
|
|