August 06, 2008, 10:13 AM
Mighty MaxPRINT * and Defined Fields
Is there a setting that can be turned on that will make PRINT * print all fields including defined ones?
DEFINE FILE CAR
CAR_MODEL/A50 WITH SEATS = CAR || MODEL;
END
TABLE FILE CAR
PRINT *
END
Instead of
DEFINE FILE CAR
CAR_MODEL/A50 WITH SEATS = CAR || MODEL;
END
TABLE FILE CAR
PRINT *
CAR_MODEL
END
I am working on a report that has a whole lot of defined fields. Most of them are filler for a flat file that is created. When it comes time to create the flat file the code would be a lot simpler if i could just do a PRINT * to a HOLD file.
August 06, 2008, 11:13 AM
PrarieYou could put a ? DEFINE after your defines...without the table...and get a list of them all...then cut and paste. Someone may have a better idea.
| In Focus since 1993. WebFOCUS 7.7.03 Win 2003 |
August 06, 2008, 11:42 AM
Darin LeeIn other words, no. Prarie's idea is the quickest way to get a list of all your defines, in case there are a lot of them, to paste into your fex but a PRINT * simply selects all fields in the MFD. Now if you wanted to copy the defines from your fex into the MFD (ending each with a ,$) then I believe a PRINT * would get the DEFINEd fields as well.
Regards,
Darin
In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
August 06, 2008, 11:55 AM
hammo1j
CHECK FILE &FILENAME HOLD
TABLE FILE HOLD
PRINT FIELDNAME USAGE
IF FIELDNAME NE ' '
ON TABLE SAVE AS SAVEXYZ
END
-RUN
TABLE FILE &FILENAME
PRINT
-READ SAVEXYZ &INLINE.A66. &USAGE.A8.
-REPEAT LOOP9XYZ WHILE &IORETURN EQ 0;
-SET &OUTLINE = TRUNCATE(&INLINE);
-SET &USAGE = TRUNCATE(&USAGE);
&OUTLINE AS '&OUTLINE,&USAGE'
-READ SAVEXYZ &INLINE.A66. &USAGE.A8.
-LOOP9XYZ
-CLOSE SAVEXYZ
END
Works and will include defines but is complex.
Personally would like
PRINT D* (all incl defines)
PRINT DSEG. (segment all incl defines)
PRINT HDSEG. (prints segment + segments above in hierarchy incl defines)
But that would be in heaven only I think!
Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2
Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo
August 06, 2008, 03:40 PM
Danny-SRLJohn,
I'm afraid that CHECK FILE ... HOLD does not save the DEFINE fields. So I think that Prarie has the idea. In M/F Focus one can redirect the messages, output, echo to a file but I haven't found how to do that in W/F.
Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
August 07, 2008, 07:49 AM
hammo1jDaniel
Yes you're right it only does the defines in the master. (which * also does not print)
Also checked SYSCOLUM and not in there either.
Does SM (session monitor) still work? You could record the output of ? DEFINE to a file that way.
Regards
John
Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2
Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo
August 07, 2008, 08:56 AM
Danny-SRLJohn,
Alas, SM is M/F... It was great!
Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
August 07, 2008, 09:03 AM
Mighty MaxThanks for all the info.
I went ahead and used Prarie's method of cut and paste using ? DEFINE.
It was the simplest solution that I could understand.
WebFOCUS 8.1.05M Unix Self-Service/MRE/Report Caster - Outputs Excel, PDF, HTML, Flat Files
August 07, 2008, 09:21 AM
PrarieWhatever works!
| In Focus since 1993. WebFOCUS 7.7.03 Win 2003 |