For Programmers: Free Programming Magazines  


Home > Archive > Clarion > May 2006 > How to use data in a field as a label to another field??









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author How to use data in a field as a label to another field??
lsumnler@gmail.com

2006-05-23, 6:55 pm

Is it possible to use the data in a field of one file as a label to a
field in another file.

Here is my problem.

My company uses a third part that they receive orders from. This
company passes me a file for each order in what the call a tag file.
Each record in the file contains the following three field in a comma
delimited format

"fieldname","scope","actual data"
"Name","Ord","John Smith"
"address1","Ord","123 Wacker Dr"
....
"ShipToName","Ord","John Doe"
....
"Qty","LinX","2" /The "X" in LinX
can be a number between 1 and 4/
"ItemNo"."LinX","xyz-1234"
etc

The company has sent me a listing of all there field name tags and
scope codes. What I want to do is create a TPS file defined as
followes

Tag String(30) /would contain there tag names/
Scope String(4) /would contain there scope codes/
MyLabel String(40) /would contain the Prefix and field label to my
order and line item file/

Then in my code when I read a record from their file I would look the
tag name up in my TPS file find the field name in under MyLabel and
move the date into my order and line detail file. What I can't figure
out is how to use the data contained in the field MyLabel as a label to
my order and line item detail file. Or if it is possible.

Has anyone done this and if so could you give me an example of how. I
started looking at the WHO, WHAT AND WHERE?

Len

lsumnler@gmail.com

2006-05-25, 6:55 pm

Never mind it can't be done in clarion or any other compiled language.

Donald Tees

2006-05-25, 6:55 pm

lsumnler@gmail.com wrote:
> Never mind it can't be done in clarion or any other compiled language.
>

It not only *can* be done, but you can tell Clarion to link the two so
that reading the main file also gets the appropriate table entry. It is
a very common (and simple) linkage in *most* high level languages,
starting with Cobol of about 35 years back.

Donald
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com