Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delete Record from FlatFile

Status
Not open for further replies.

USADarts

Programmer
Dec 20, 2004
21
US
BILLOUT is in the QTEMP Library

***********************************************
FBILLOUT UP F 180 DISK
***********************************************
IBILLOUT NS 01 128 C1
I 76 76 CO#
***********************************************

I need to run through the flat file. If CO# is = "H", I need to delete that record from the FlatFile. How is this done?

Thanks
David
 
you can always do an ifeq statement, even though it is "old school".. it still works..

co# ifeq "H"
DELTE (RECORD NAME)
END

SINCE AND SIMPLE,, not at all fancy
 
Could use an SQL statement to delete all the records where CO# = 'H'


C/Exec SQL
C+ Delete from QTEMP/BILLOUT
C+ Where CO# = 'H'
C/End-Exec
 
Can you run SQL statements against PROGRAM defined files? In the example BILLOUT is a program defined file. I thought the file would have to be EXTERNALLY defined?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top