I have the following code:
TABLE FILE ACR_DATA SUM PER1 AS '' PER2 AS '' COMPUTE DIFF1/P32BS = PER2 - PER1; AS '' PER3 AS '' PER4 AS '' COMPUTE DIFF2/P32BS = PER4 - PER3; AS '' PER5 AS '' PER6 AS '' COMPUTE DIFF3/P32BS = PER6 - PER5; AS '' BY SRTING NOPRINT BY ORGANIZATION_LEVEL_3 NOPRINT BY DEPARTMENT_CODE NOPRINT BY SUBJECT NOPRINT ON SUBJECT SUBHEAD
That is throwing this error:
0 ERROR AT OR NEAR LINE 383 IN PROCEDURE rom_proj_inst_plan (FOC003) THE FIELDNAME IS NOT RECOGNIZED: PER4 BYPASSING TO END OF COMMAND (FOC009) INCOMPLETE REQUEST STATEMENT
because I'm finding that PER4 and PER6 columns may not be in the file: ACR_DATA
Anyone have any creative ways to work-around and perform the COMPUTE only if the column exists?This message has been edited. Last edited by: globalwm,
8.0.02M, Oracle 11.2 (AIX), Windows 2008R2, HTML, PDF, Excel
CHECK FILE ACR_DATA HOLD AS ACRFIELDS TABLE FILE ACRFIELDS PRINT FIELDNAME IF FIELDNAME EQ PER$$ ON TABLE SAVE END -RUN -SET &PER_COUNT = 0 + &RECORDS;will capture the count (assuming none of the non-varying fieldnames starts with PER); take it from there.
There is also the SYSCOLUM table that will have this info as well
Interesting - I can see the good files have:
NUMBER OF FIELDS= 15
while the bad (missing columns) have:
NUMBER OF FIELDS= 13
Thanks Waz - I found THIS which I can try to use.
TABLE FILE SYSCOLUM PRINT COLTYPE LENGTH WHERE TBNAME EQ 'CAR' WHERE NAME EQ 'MODEL' -*ON TABLE SAVE END -RUN
Awesome, thank you.
Senior Business Intelligence Analyst (BIA) @ Enclara Pharmacia
Production: WF 8.09, App Studio, BIP, RC, MSSQL / Test: WF 8202M, App Studio, BIP, RC, MSSQL
|Powered by Social Strata|