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

TRUNCATING A FIELD IN BROWSE MODE dbase4 for dos 2

Status
Not open for further replies.

yesgirls

Technical User
Oct 22, 2006
4
US
HI...using dbase4 for dos (xpmode/win7) what i would like to accomplish if possible is to truncate one field so
that i can view 3 fields when browsing...field 1= 1 character/field 2(price) = 6 characters(numeric) and the field
i want to truncate is a character field of 80 characters. when i use "set field to 1,2,3" I am unable to see all
3 fields at the same time while browsing ...I would like to truncate field '3'(in 'set field' only view) to say...20 characters. A viable alternative would be to be able to view the "record #, field 1, and field 2 in browse mode (i do realize i can reference the record# at the bottom of the screen...but would want to see it displayed in the same row as field 1 and 2. Thanks for any help on my behalf...dave
 
Not familar with the browsemode perse, but can you use the SUBSTR command, SUBSTR(FIELD,1,20)?

Jim C.
 
JC...thanks much for the reply...not sure how to apply your suggestion...dave
Here's a sample file
--------------------------------------------
. use test
. disp stru
Structure for database: C:\DBASE\TEST.DBF
Number of data records: 10000
Date of last update : 12/18/14
Field Field Name Type Width Dec Index
1 I Character 2 N
2 CAT Character 1 N
3 HTM Character 3 N
4 COM Character 4 N
5 PRICE Numeric 6 2 N
6 TITLE Character 80 N
** Total ** 97* 88
. set field to cat, price, title
and then i type
. browse
and dbase presents me with an editable database
----------------------------------------------------
but i would like to do so with 'title' truncated to say...20 characters
thanks again for thinking on this...been using dbase since 1982 (started with cp/m) :)

 
1 I Character 2 N
2 CAT Character 1 N
3 HTM Character 3 N
4 COM Character 4 N
5 PRICE Numeric 6 2 N
6 TITLE Character 80 N

browse fields I, CAT, HTM, COM, PRICE, TITLE /20

or

set fields to cat, price, title
browse fields cat, price, title /20

Joe
 
joe...very cool...how simple!

thanks so much...happy to paypal you a few $$...let me know if/how this is possible...perhaps
i can give you my website and you can contact me from there...very much appreciated....dave
 
Feel free to indicate your website, and I can contact you.

I would also like to mention vDOS;


vDOS is designed to run DOS Business Applications, such as dBASE, on modern OSes.

It provides full-screen, better fonts, printing, copy/paste to/from Windows Clipboard, and more.

I have been using vDOS for some time, and all of my dBASE IV 2.0, Clipper 5.01, and Microsoft COBOL 4.5 programs run with no problems.

Joe Caverly
 
joe...thanks again...on second thought...perhaps you can contact me through my ebay id = yesterdaygirls
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top