Focal Point
Deleting Hold files
February 24, 2006, 01:03 AM
<sandy_16>Deleting Hold files
Hi,
I would like to know how to delete hold files,as it is not allowing me to reuse despite clearing it.Any Better ways to do it.
Regards
Sandeep
February 24, 2006, 07:11 AM
susannahWhere are these hold files?
In the agent? or do you have a TEMPDIR set?
what are they called (just HOLD?)
edit your profile signature to tell us what system you're on.
If you're in windows,
CMD ERASE HOLD.*
will erase the hold.ftm from your agent.
If you're using some TEMPDIR, or if you have some FILEDEF HOLDMAST set, then you can adapt the ERASE command to locate the files.
CMD ERASE drive:\dir..\hold.ftm or .mas or .*
If you're in Unix, the syntax is slightly dif, you can search on this board.
But you may want to control this situation by better control of your FILEDEF HOLDMAST or your TEMPDIR settings.
| In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID |
February 27, 2006, 01:48 AM
<sandy_16>Hi Susannah,
The hold files are in the agent.the code is as follows
SET NULL = ON
-SET &TPATH = TEMPPATH(80,'A80');
-SET &AGENT = UPCASE(8,GETTOK(&TPATH,&TPATH.LENGTH,-2,'/',8,'A8'),'A8');
WRITE &AGENT
-SET &TEMPTABLE = 'INSERT_ERR_' || &AGENT;
TABLE FILE car_ftmp
PRINT
CLIENT
FILE_FORMAT
RECORD_TYPE
FIELD_NAME
-*FIELD_RULE
ON TABLE SET ASNAMES ON
ON TABLE HOLD AS &TEMPTABLE FORMAT SQLORA
END.
I am working on a unix platform and the version is 533.
Thanks in advance.
Regards
Sandeep
February 27, 2006, 02:17 AM
susannahi do my temppathing slightly differently from your way, which i'll just offer for no particular reason...
-SET &MYPATH = TEMPPATH(40,'A40');
-* take off that last \ so set tempdir works
-SET &AL = ARGLEN(40,&MYPATH,'I2') -1 ;
-SET &LAL ='A'|&AL;
-SET &MYPATH = SUBSTR(40,&MYPATH,1,&AL,&AL,'&LAL');
here's a thread that talks about deleting unix files
try thisand here's another one
another one
| In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID |
February 27, 2006, 09:51 AM
jbmuirHave you tried using -UNIX?
TABLE FILE MYFILE
PRINT SOMETHING
ON TABLE HOLD AS WALLY
END
-RUN
-UNIX rm ./wally.*
-IF &EXITRC NE 0 THEN GOTO ERRORLABEL;
WF 7.1.6 moving to WF 7.7, Solaris 10, HTML,PDF,XL
February 27, 2006, 11:08 AM
EricHSandeep,
You're doing a HOLD FORMAT SQLORA. So this does not create a physical file on your Unix system; instead it creates a SQL TABLE in your ORACLE database.
EricH
February 27, 2006, 01:20 PM
<JG>You need to issue a SQL DROP TABLE request.
However if the table does not exist then it will give you and SQL error.
If you are cleaning up at the end of the job just drop the table providing it is always created
ENGINE SQLORA
DROP TABLE &TEMPTABLE.EVAL
END
If you want to Drop it at the begining or there is a chance that it might not be created do it like this
ENGINE SQLORA
SELECT TABLE_NAME FROM ALL_TABLES
WHERE TABLE_NAME='&TEMPTABLE.EVAL'
END
-RUN
-IF &LINES.EVAL NE 1 THEN GOTO SKIPDROP;
-RUN
ENGINE SQLORA
DROP TABLE &TEMPTABLE.EVAL
END
-SKIPDROP
February 28, 2006, 03:35 AM
<sandy_16>quote:
Originally posted by EricH:
Sandeep,
You're doing a HOLD FORMAT SQLORA. So this does not create a physical file on your Unix system; instead it creates a SQL TABLE in your ORACLE database.
EricH
Erich,
That is some useful information thanks.
Regards
Sandeep
February 28, 2006, 03:36 AM
<sandy_16>quote:
Originally posted by JG:
You need to issue a SQL DROP TABLE request.
However if the table does not exist then it will give you and SQL error.
If you are cleaning up at the end of the job just drop the table providing it is always created.
Guru,
Thanks for the code.It is very useful..
Regards
Sandeep
ENGINE SQLORA
DROP TABLE &TEMPTABLE.EVAL
END
If you want to Drop it at the begining or there is a chance that it might not be created do it like this
ENGINE SQLORA
SELECT TABLE_NAME FROM ALL_TABLES
WHERE TABLE_NAME='&TEMPTABLE.EVAL'
END
-RUN
-IF &LINES.EVAL NE 1 THEN GOTO SKIPDROP;
-RUN
ENGINE SQLORA
DROP TABLE &TEMPTABLE.EVAL
END
-SKIPDROP