Delete lines using ISREDIT - Help needed.



TSO Programming, ISPF, SDF, SDSF and PDF, FTP, TCP/IP Concepts, SNA & SNA/IP etc...

Delete lines using ISREDIT - Help needed.

Postby Viswanathchandru » Fri Jan 04, 2013 12:32 am

Dear all,

I was trying this piece of code(below) and I was not able to delete the particular lines as expected. And one more thing is even though I have coded "ISREDIT SAVE" "ISREDIT END" I need to press f3 for the file to get saved. Can anyone one suggest me where do I go wrong. Apologize if my thoughts are wrong.


/* REXX */                                 
"ISPEXEC EDIT DATASET('Z114VCT.DUMMY')"     
ADDRESS TSO                                 
"ISREDIT DELETE 1 10"                               
"ISREDIT SAVE"                             
"ISREDIT END"                               



Regards,
Viswa
Viswanathchandru
 
Posts: 271
Joined: Mon Oct 25, 2010 2:24 pm
Has thanked: 25 times
Been thanked: 0 time

Re: Delete lines using ISREDIT - Help needed.

Postby NicC » Fri Jan 04, 2013 1:11 am

For a start you have not defined it as a macro. There is no macro statement.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: Delete lines using ISREDIT - Help needed.

Postby Viswanathchandru » Fri Jan 04, 2013 1:38 am

Hi NicC,

Thanks for your time!

And that didn't wort even after adding "ADDRESS ISPEXEC"
"ISREDIT MACRO"


Please advice

Regards,
Viswa
Viswanathchandru
 
Posts: 271
Joined: Mon Oct 25, 2010 2:24 pm
Has thanked: 25 times
Been thanked: 0 time

Re: Delete lines using ISREDIT - Help needed.

Postby Peter_Mann » Fri Jan 04, 2013 1:52 am

The correct way to call ISPEXEC MACRO services are
/* REXX */                                 
"ISPEXEC EDIT DATASET('Z114VCT.DUMMY') MACRO(dellines)"     
EXIT CODE(&LASTCC)
 

then your MACO (dellines) for example can consist of
ISREDIT MACRO
ISREDIT DELETE 1 10                               
ISREDIT SAVE                             
ISREDIT END 


I have not testing the code for syntax but the basics are there.
Peter

These users thanked the author Peter_Mann for the post:
Viswanathchandru (Fri Jan 04, 2013 2:01 am)
Peter_Mann
 
Posts: 145
Joined: Fri Jun 24, 2011 7:37 pm
Location: Lowell,AR
Has thanked: 15 times
Been thanked: 3 times

Re: Delete lines using ISREDIT - Help needed.

Postby Viswanathchandru » Fri Jan 04, 2013 2:01 am

Thanks a ton Peter...

Regards,
Viswa
Viswanathchandru
 
Posts: 271
Joined: Mon Oct 25, 2010 2:24 pm
Has thanked: 25 times
Been thanked: 0 time

Re: Delete lines using ISREDIT - Help needed.

Postby enrico-sorichetti » Fri Jan 04, 2013 2:02 am

here
tso-ispf/topic8602.html#p41498
You thanked for the link I posted for a working snippet

but looks like You did not care to look at it
if You had You would not have started this topic :mrgreen:
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 3002
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: Delete lines using ISREDIT - Help needed.

Postby Pedro » Fri Jan 04, 2013 2:12 am

Think of ""ISPEXEC EDIT ... " as an external subroutine. When a rexx program calls an external subroutine, the rexx program is suspended until the subroutine ends. Only when the subroutine ends does the next rexx statement get executed. And that is why your initial program could not work.
Pedro Vera
User avatar
Pedro
 
Posts: 686
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 53 times


Return to TSO & ISPF

 


  • Related topics
    Replies
    Views
    Last post