Focal Point
[Case-Opened] Record Length in Focus Reports

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/3997066006

March 21, 2011, 08:20 AM
Vinay Kumar
[Case-Opened] Record Length in Focus Reports
Hi All,

I have a requirement to create a report, but the constraint is record length should be 132 bytes. After exceeding the limit the records has to be sent to the next line.

Could any one help me in doing this.


WebFOCUS 7.6.4, Mainframe Focus
Windows XP, All Output Formats
March 21, 2011, 04:39 PM
Waz
We need more information.

What format is the report?
What page size, if its relevant?

Can you post an example ?


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

April 22, 2011, 10:32 PM
Vinay Kumar
Hi Waz, sorry for the very long late reply!

In my report the length of the row should be 132 bytes, if the row exceeds more than 132 then the remaining row details should be in the next row.

Example:

Input file has:
1 2 3 4 5 ........ 140

Output:

1 2 3 4 ...... 132
133 134........140


WebFOCUS 7.6.4, Mainframe Focus
Windows XP, All Output Formats
April 24, 2011, 04:06 AM
Danny-SRL
Vinay,

Is your report formatted, with headings, titles etc.?
Are you outputting data only and want to cut off at 132?
Or are you outputting fields and trying to find the last field after which the next one would overflow 132?
As Waz asked, could you provide a concrete example?


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

April 24, 2011, 05:23 AM
<JG>
Text format

TABLE FILE CAR
PRINT
COMPUTE A10_FIELD/TX10 = MODEL;
BY MODEL NOPRINT
END
-RUN
April 25, 2011, 05:47 AM
Vinay Kumar
quote:
Originally posted by JG:
Text format

TABLE FILE CAR
PRINT
COMPUTE A10_FIELD/TX10 = MODEL;
BY MODEL NOPRINT
END
-RUN


JG, could you please give more explanation on MODEL field. I mean what does it do in the above code.


WebFOCUS 7.6.4, Mainframe Focus
Windows XP, All Output Formats
April 25, 2011, 05:49 AM
Vinay Kumar
quote:
Originally posted by Danny-SRL:
Vinay,

Is your report formatted, with headings, titles etc.?
Are you outputting data only and want to cut off at 132?
Or are you outputting fields and trying to find the last field after which the next one would overflow 132?
As Waz asked, could you provide a concrete example?


Yes, my report contains headers and titles.

I would like to cut off the data at 132 byte, the remaining fields/data should go to next line.


WebFOCUS 7.6.4, Mainframe Focus
Windows XP, All Output Formats
April 25, 2011, 05:56 AM
<JG>
Vinay, come on That's WebFOCUS 101

Model is a field in the FOCUS CAR file Its length is A20
The COMPUTE Assigns this to a text format TX10 ie 10 characters.

When a text column is displayed it wraps the column at that length

in your case use COMPUTE DISPLAY_FIELD/TX132= ORIGINAL_FIELD
April 25, 2011, 06:15 AM
Vinay Kumar
Thanks JG. I haven't worked on CAR file so far Big Grin, its strange but true.

my report doesn't contain one field, it will have almost around 10 fields.

Input fields:
Column1 30 bytes
Column2 30 bytes
Column3 30 bytes
Column4 30 bytes
Column5 12 bytes
Column6 20 bytes

Output:

Column1 Column2 Column3 Column4 Column5
Assume the header length has crossed 132 bytes, then the column 6 has to be come in the next line.

Column1 Column2 Column3 Column4 Column5
Column6

The respected values of the columns should also be displayed in similar to header. Is this possible?


WebFOCUS 7.6.4, Mainframe Focus
Windows XP, All Output Formats
April 25, 2011, 06:34 AM
san250671
What's the input? You are reading from flat file or from a database?


7.6.9/7.7
Windows/OS 390
PDF/Excel
April 25, 2011, 07:07 AM
Vinay Kumar
San, will read my input thru flat file.


WebFOCUS 7.6.4, Mainframe Focus
Windows XP, All Output Formats
April 25, 2011, 01:48 PM
<JG>
Need to use a fixed font,

( the part before the define is just creating the master and a sample data file

 
EX -lines 8 EDAPUT MASTER,datafile,CV,FILE,
FILENAME=datafile, SUFFIX=FIX  , $
    FIELDNAME=Column1, ALIAS=Column1, USAGE=A30, ACTUAL=A30,$
    FIELDNAME=Column2, ALIAS=Column2, USAGE=A30, ACTUAL=A30,$
    FIELDNAME=Column3, ALIAS=Column3, USAGE=A30, ACTUAL=A30,$
    FIELDNAME=Column4, ALIAS=Column4, USAGE=A30, ACTUAL=A30,$
    FIELDNAME=Column5, ALIAS=Column5, USAGE=A12, ACTUAL=A12,$
    FIELDNAME=Column6, ALIAS=Column6, USAGE=A20, ACTUAL=A20,$
-RUN
FILEDEF datafile DISK datafile.ftm
-RUN
-WRITE datafile 12345678901234567890123456789A12345678901234567890123456789B12345678901234567890123456789C12345678901234567890123456789D12345678901E1234567890123456789F
-WRITE datafile 12345678901234567890123456789A12345678901234567890123456789B12345678901234567890123456789C12345678901234567890123456789D12345678901E1234567890123456789F
-WRITE datafile 12345678901234567890123456789A12345678901234567890123456789B12345678901234567890123456789C12345678901234567890123456789D12345678901E1234567890123456789F
-WRITE datafile 12345678901234567890123456789A12345678901234567890123456789B12345678901234567890123456789C12345678901234567890123456789D12345678901E1234567890123456789F
-WRITE datafile 12345678901234567890123456789A12345678901234567890123456789B12345678901234567890123456789C12345678901234567890123456789D12345678901E1234567890123456789F
-WRITE datafile 12345678901234567890123456789A12345678901234567890123456789B12345678901234567890123456789C12345678901234567890123456789D12345678901E1234567890123456789F

-RUN
DEFINE FILE DATAFILE
 HEADLINE1/A132='Column1                       Column2                       Column3                       Column4                       Column5';
 HEADLINE2/A132='Column6';
 OUTLINE/TX132=Column1 || Column2 || Column3 || Column4 || Column5 || Column6;
END
TABLE FILE DATAFILE
HEADING
"<HEADLINE1"
"<HEADLINE2"
PRINT OUTLINE AS ''
ON TABLE SET SHOWBLANKS ON
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLE *
FONT=COURIER,$
ENDSTYLE
END