Hey, I'm trying to make a GOTO statement that says: If field X exists in the held file then goto here, else goto there. Is there an easy way to do this?This message has been edited. Last edited by: Mark1,
Windows version 768
June 25, 2009, 09:53 AM
GinnyJakes
How many rows are there in the hold file? You could write a flag to a SAVE file, -READ it into an amper variable and then use DM looping or GOTO to accomplish your needs.
If you are trying to determine if a particular column exists in a hold file, then use:
TABLE FILE SYSCOLUM
PRINT NAME
WHERE TBNAME EQ 'Hold File Name'
WHERE NAME EQ 'Column Name'
ON TABLE SAVE
END
-RUN
-IF &LINES GT 0 THEN GOTO ...
Waz...
Prod:
WebFOCUS 7.6.10/8.1.04
Upgrade:
WebFOCUS 8.2.07
OS:
Linux
Outputs:
HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!
June 25, 2009, 06:35 PM
Doug
Do you mean: "If field X has a value?" If so, then Ginney plan should do the trick. However, if you mean "Does field X exist in a file?" then Waz's plan should work. But, you should already know if the "field" exists as it's part of your TABLE FILE request. Otherwise, I'm confused...
June 29, 2009, 10:24 AM
Mark1
Thank you! Waz's code is what I needed... thanks again!