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
 

 

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: 1018
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: 1228
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
This topic is locked: you cannot edit posts or make replies. Need help on If condition continuatio... ashok_uddaraju CLIST & REXX 4 Fri May 19, 2017 8:55 am
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am


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