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
 
How to delete lines from a file using Rexx without ISREDIT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: How to delete lines from a file using Rexx without ISREDIT
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: 1060
Location: Oostende, Belgium

PostPosted: Tue Jun 23, 2009 3:50 pm    Post subject:
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: 1288
Location: Chennai, India

PostPosted: Tue Jun 23, 2009 4:23 pm    Post subject: Reply to: How to delete lines from a file using Rexx without
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: 8593
Location: Back in jolly old England

PostPosted: Tue Jun 23, 2009 4:23 pm    Post subject:
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: 2360
Location: Israel

PostPosted: Tue Jun 23, 2009 5:36 pm    Post subject:
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: 1243
Location: Israel

PostPosted: Tue Jun 23, 2009 9:12 pm    Post subject: Re: How to delete lines from a file using Rexx without ISRED
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 5 Wed Oct 04, 2017 6:54 am
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 47 Fri Sep 29, 2017 1:08 pm

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