Highlighted
Regular Contributor.
Regular Contributor.
1050 views

Using the contents of a variable as a variable

[Migrated content. Thread originally posted on 25 May 2012]

Hi,

I’m trying to create a delimited text file using only selected fields from a database. The problem I have is that the fields I need to extract from the database and the fields in the file that I want to move them to can change. So for example, I may want to move DATABASE-FIELD-1 to TEMP-FIELD-1 but I don’t know that the content (or value) of DATABASE-FIELD-1 is DATE-OF-BIRTH, nor do I know that the content (or value) of TEMP-FIELD-1 is TEMP-DATE-FIELD-1.

Is there a quicker way of finding out what the fields are without using IF statements to determine what each of the fields are? In other words, can I use the contents of a variable as a variable?

Any help would be very much appreciated.
0 Likes
1 Reply
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Using the contents of a variable as a variable

You posted your question on the Extend portion of the forum. The extend forum deals with ACUCOBOL questions and issues. I can not think of how you can do what you are trying to do without knowing what the database columns or variables should contain. I think you'd be better off posting your question on the Net Express portion of the forum.

http://community.microfocus.com/Forums/3_COBOL__Net_Express_Server_Express_Visual_COBOL
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.