Search code examples
webfocus

What's the point of the "/" after defining something in webfocus?


I'm currently learning webfocus and I'm learning about defining, but what is teaching me isn't doing a great job. An example that has been given to me is about cars. If I want to make a new field to find the difference between the retail cost and the dealer cost, they said to input

DEFINE FILE CAR
CALCULATED_DIFFERENCE/D5 = RETAIL_COST - DEALER_COST
END

What I'm confused about is what the

/D5

is there for. Is it required to define a file? Does it have to be something specific? I've researched a lot but haven't found any answers about it.


Solution

  • I've found out what it means. The /D5 is known as formatting. It allows WebFOCUS to know what is being used in the file. The D stands for decimal, which means that if I wanted to I could format it as D/5.2 and an A stands for alphanumeric. If I were to define a file called person_last_name, I would use A/30. The number determines how much data it can hold, so 30 is all I need as a person's last name probably won't be longer than 30 characters.