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

How to Close a seqential file opened by a macro in REXX


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

New User


Joined: 08 Nov 2006
Posts: 21
Location: india

PostPosted: Tue Nov 28, 2006 6:32 pm
Reply with quote

hi all ..... icon_smile.gif

i have written a macro to close a sequential file .....

CLOSEMAC
#######################################
/*REXX*/
"ALLOC DA('TEBTOTS.EFT.DSN2') F(INDD) OLD"
"EXECIO 0 DISKR INDD (FINIS"

#########################################

The file 'TEBTOTS.EFT.DSN2' is used by some other macro called PDSEDIT ...
after executing macro PDSEDIT i am closing the file through macro CLOSEMAC... i cant close this file in macro PDSEDIT due to logic reasons..

but the CLOSEMAC is not closing it properly....
please help me.....
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Tue Nov 28, 2006 7:15 pm
Reply with quote

What about FREE?

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

New User


Joined: 08 Nov 2006
Posts: 21
Location: india

PostPosted: Tue Nov 28, 2006 7:50 pm
Reply with quote

hi ..

i dont know the syntax of FREE .... please tell me the syntax....

thank you.....
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Tue Nov 28, 2006 9:17 pm
Reply with quote

TSO HELP FREE.

icon_rolleyes.gif
Back to top
View user's profile Send private message
amolj

New User


Joined: 08 Nov 2006
Posts: 21
Location: india

PostPosted: Thu Nov 30, 2006 11:25 am
Reply with quote

/*REXX*/
"ALLOC DA('TEBTOTS.EFT.DSN2') F(INDD) OLD"
"ISREDIT FREE DDNAME('INDD')"

i tried with FREE ... but it not working..... tell me if the syntax for FREE is correct? ... or is there any other way ....
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Fri Dec 01, 2006 12:28 am
Reply with quote

FREE is not an Edit-Macro command, it is a TSO command. You shouls invoke it in the same way you invoke ALLOC.

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

New User


Joined: 08 Nov 2006
Posts: 21
Location: india

PostPosted: Mon Dec 04, 2006 12:44 pm
Reply with quote

hi .....

according to my requirement the dataset 'TEBTOTS.EFT.DSN2' is used by my macro(PDSEDIT5)... i cannot close it in the macro(PDSEDIT5)...

after executing the macro(PDSEDIT5) once ....i want to make changes in the dataset 'TEBTOTS.EFT.DSN2' and again run the same macro (PDSEDIT5) ... while i run the macro(PDSEDIT5) second time the changes in the dataset'TEBTOTS.EFT.DSN2' are not reflected...

i tried closing the dataset 'TEBTOTS.EFT.DSN2' by the macro command
"FREE DATASET('TEBTOTS.EFT.DSN2')" ...it is successfully closing the dataset ....but when i make changes in the dataset 'TEBTOTS.EFT.DSN2' and run macro (PDSEDIT5) second time the chnages are not reflected ...
every time i have logoff from mainframe if i make changes in the dataset
'TEBTOTS.EFT.DSN2' so that changes are properly reflected....


please help me... how can i free the dataset from the memory.....so that i dont have to logoff every time
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 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
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
Search our Forums:

Back to Top