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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do you delete first line in output file?

Status
Not open for further replies.

baggetta

Technical User
Feb 27, 2003
116
US
I'm creating this flat file but it putting in 1 empty line at the top of file, how do I delete it?

output to itemlist.txt.
for each pt_mstr no-lock
where pt_part_type <> &quot;CTN71&quot;
with frame aaa no-label down:
display pt_part
pt_desc1
pt_site
pt_status
pt_pm_code with no-label.
end.
output close.

Here's the output file.
--- this is a blank line ----
10700 04 SED MALIBU DRV TOTAL RIV ACT P
10710 04 SED MALIBU PAS TOTAL RIV ACT P
10720 04 SED MALIBU R/CUSH RIV ACT P
10730 04 SED MALIBU R/BACK RIV ACT P
10740 04 XBACK MALIBU TOTALS RIV ACT P
292082 NUT-FLANGED HEX RIV OBS P
 
This is a guess, but you might have an empty record in your pt_mstr table. The obvious solutions are:

- delete the empty record
- use predicate logic (the WHERE clause) to exclude the empty record.

If that's not the case, let us know.
 
There is no empty record. The system won't allow a blank item master record. I've also tried to use pt_part <> &quot;&quot; and this didn't work either. Weird part, I've seen this before and I know there is a way to remove this line. I just can't remember how my display statment was. I think this is where I have to make the change.

Any other ideas?
 
baggetta,

try
display x y z with width 80 no-label no-box stream-io no-attr-space.

longhair
 
Ah! Output to a file: for better control, use PUT rather than DISPLAY. (You'll have to look up the syntax.)
 
longhair, thanks it was the &quot;NO-BOX&quot; that makes the blank line disapear.
sweet.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top