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

How to delete lines from a file using Rexx without ISREDIT


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
cma rajith

New User


Joined: 28 May 2008
Posts: 30
Location: India

PostPosted: Tue Jun 23, 2009 3:38 pm
Reply with quote

Hi,

My requirement is at the end of my Rexx program, to delete the records from the file which i created during the execution of program.I cannot use ISREDIT as I don't want to show this file to the user.

The file has to be empty for the next run of the program, I can't delete the file due to some constraints in the requirement. Can anyone please guide me?

Thanks,
Ceema
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1306
Location: Vilnius, Lithuania

PostPosted: Tue Jun 23, 2009 3:50 pm
Reply with quote

Your requirements are clear as mud.

Please tell us what you really want to do? In what environment (fore- or background) does your REXX exec run? Which user cannot see what and why not?
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Tue Jun 23, 2009 4:23 pm
Reply with quote

Hi,

I think your requirement is to delete all the records from the files which were created while executing the REXX exec.

If yes, you can add one step each for the files that you had created in the exec.

Code:
/* REXX */
"EXECIO 0 DISKW DDNAME (FINIS"
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Jun 23, 2009 4:23 pm
Reply with quote

Why do you assume that by using ISREDIT that you will expose the file to the user
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Tue Jun 23, 2009 5:36 pm
Reply with quote

You can invoke IDCAMS REPRO from within REXX. Copy the file to itself with COUNT(0).

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

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Tue Jun 23, 2009 9:12 pm
Reply with quote

cma rajith wrote:
I cannot use ISREDIT as I don't want to show this file to the user.

Use REPRO or EXECIO as suggested.

Just be aware that you are doing the right thing, but for the wrong reason: if you edit a file with a macro, and the macro closes the file (with or without saving), nothing will appear on the user's screen.
Back to top
View user's profile Send private message
cma rajith

New User


Joined: 28 May 2008
Posts: 30
Location: India

PostPosted: Wed Jun 24, 2009 4:35 pm
Reply with quote

Thanks a lot to All..

I have used REPRO and it fullfills my 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 -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
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
Search our Forums:

Back to Top