Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tool to print 1

Status
Not open for further replies.

gf73

Programmer
Aug 26, 2005
16
IT
Ciao,

I work with an old acucobol version (4.3) and I exchanged some old ASCII printout in RTF but the lay out is not very well.
I need some tool to create custum reports.
Any suggestion?
Thanks a lot.

Ciao
Gianni
 
We use a report writer called Decision Analyzer on the mainframe and we have the server version called Decision Centric that works with database files.

This works with our IBM Unidata Database.

If you do not like my post feel free to point out your opinion or my errors.
 
I like to create SYLK files and print them with Excel.
 
Ciao Crox,

I don't know SYLK format. Could you please tell me more information about it?

Thanks a lot.

Ciao
Gianni
 
Ciao Ceh4702

I saw Decisio Analyzer but it seems it is not what I'm looking for. I need a tool easy to use to convert my old printout with a graphical windows print.

Thanks

Ciao
Gianni
 
SYLK is a format that is designed for program/platform-independent representation of spreadsheets.

Regards,

Glenn
 
Ok. Thanks for the information 3gm, but I don't understand how create a SYLK extention file in my application...
Thanks again.

Ciao
Gianni
 
Hi Gianni,

Just make a simple spreadsheet in for example Excel. Save it as SYLK. Read it again into Excel and see if the layout with all it's properties do hold. Then use an editor to see the format.

In Dr. Dobbs yournal's file formats is a simple description of the format. But... it is easy to understand te format yourself, just by looking at it.

example:

Code:
ID;PWXL;N;E
P;PGeneral
P;P0
P;P0.00
P;P#,##0
P;P#,##0.00
P;P#,##0_-;;#,##0\-
P;P#,##0_-;;[Red]#,##0\-
P;P#,##0.00_-;;#,##0.00\-
P;P#,##0.00_-;;[Red]#,##0.00\-
P;P"$"\ #,##0_-;;"$"\ #,##0\-
P;P"$"\ #,##0_-;;[Red]"$"\ #,##0\-
P;P"$"\ #,##0.00_-;;"$"\ #,##0.00\-
P;P"$"\ #,##0.00_-;;[Red]"$"\ #,##0.00\-
P;P0%
P;P0.00%
P;P0.00E+00
P;P##0.0E+0
P;P#\ ?/?
P;P#\ ??/??
P;Pd/m/yyyy
P;Pd/mmm/yy
P;Pd/mmm
P;Pmmm/yy
P;Ph:mm\ AM/PM
P;Ph:mm:ss\ AM/PM
P;Ph:mm
P;Ph:mm:ss
P;Pd/m/yyyy\ h:mm
P;Pmm:ss
P;Pmm:ss.0
P;P@
P;P[h]:mm:ss
P;P_-"$"\ * #,##0_-;;_-"$"\ * #,##0\-;;_-"$"\ * "-"_-;;_-@_-
P;P_-* #,##0_-;;_-* #,##0\-;;_-* "-"_-;;_-@_-
P;P_-"$"\ * #,##0.00_-;;_-"$"\ * #,##0.00\-;;_-"$"\ * "-"??_-;;_-@_-
P;P_-* #,##0.00_-;;_-* #,##0.00\-;;_-* "-"??_-;;_-@_-
P;FArial;M200
P;FArial;M200
P;FArial;M200
P;FArial;M200
P;EArial;M200;SB
P;EArial;M200;SB;L11
F;P0;DG0G8;M255
B;Y6;X3;D0 0 5 2
O;L;D;V0;K47;G100 0.001
C;Y1;X1;K"demo print using Sylk"
F;SDM6;Y3
C;K"1st"
F;SDM6;X2
C;K"2nd"
F;SDM6;X3
C;K"3rd"
C;Y5;X1;K1
C;X2;K100
C;X3;K500
F;P13;F%0G;Y6;X1
C;K0.01
F;P13;F%0G;X2
C;K1
F;P13;F%0G;X3
C;K2
E

The first record

ID;PWXL;N;E

is just a header, not import. Copy it.

The records beginning with "P;P" are Pictures.

"P;F" and "P;E" are make-up, part of the Matrix.

Records like this:

"F;P13;F%0G;Y6;X1" refers to Picture 13. This first table starts with offset zero.

The next table starts with offset 1 and tells something about the layout.

Record "P;EArial;M200;SB;L11" says Arial letter type, M200 is about the size, SB is about Style Bold, L11 means READ.

Record "F;SDM6;Y3" says Format, same column as the previous, y3 = row 3, SDM6 says Style Bold, Matrix 6 which is the previous P record.

"C;K"3rd"" says a alfanumeric constant with same column/row as previous and the text is "3rd".

You can use on the F and C records, X and Y definitions on each record to make it easier to program. It does not byte and even if you make a definition twice, the last one counts. Smart if you want to create some marker afterwards.

The E record is always the last.

Play with it, and you will find out almost everything. It is not that difficult at all. I use it on the mainframe to give my users a perfect print and also not just a print, but a starting point to continue their work.

Regards,

Crox




 
Thanks a lot for your explaination! Now I try to use it for my purposes. I let you now...!
Thanks again!
Ciao
Gianni
 
I tested SYLK format in my application, but doesn't support box and line in the layout. My customers prefer graphical printout. Is possibile create a template in excel and populate each variable from cobol application?
Thanks.
Ciao
Gianni
 
If you create a piece of VBA, you can import any kind of file but at that moment, you have 2 places to maintain the application so I wouldn't do that.

You can create a textual box, also gray shade, also use color.

But I am not an expert in Excel or VBA.

If your customer prefers graphical printout, he/she doesn't want to continue using your output. That is not smart. Graphical layout is easy to add, but it is never easy to use something which you have only on paper on your computer.

Regards,

Crox

 
An other example, because a box is here:

Code:
ID;PWXL;N;E
P;PGeneral
P;P0
P;P0.00
P;P#,##0
P;P#,##0.00
P;P#,##0_-;;#,##0\-
P;P#,##0_-;;[Red]#,##0\-
P;P#,##0.00_-;;#,##0.00\-
P;P#,##0.00_-;;[Red]#,##0.00\-
P;P"$"\ #,##0_-;;"$"\ #,##0\-
P;P"$"\ #,##0_-;;[Red]"$"\ #,##0\-
P;P"$"\ #,##0.00_-;;"$"\ #,##0.00\-
P;P"$"\ #,##0.00_-;;[Red]"$"\ #,##0.00\-
P;P0%
P;P0.00%
P;P0.00E+00
P;P##0.0E+0
P;P#\ ?/?
P;P#\ ??/??
P;Pd/m/yyyy
P;Pd/mmm/yy
P;Pd/mmm
P;Pmmm/yy
P;Ph:mm\ AM/PM
P;Ph:mm:ss\ AM/PM
P;Ph:mm
P;Ph:mm:ss
P;Pd/m/yyyy\ h:mm
P;Pmm:ss
P;Pmm:ss.0
P;P@
P;P[h]:mm:ss
P;P_-"$"\ * #,##0_-;;_-"$"\ * #,##0\-;;_-"$"\ * "-"_-;;_-@_-
P;P_-* #,##0_-;;_-* #,##0\-;;_-* "-"_-;;_-@_-
P;P_-"$"\ * #,##0.00_-;;_-"$"\ * #,##0.00\-;;_-"$"\ * "-"??_-;;_-@_-
P;P_-* #,##0.00_-;;_-* #,##0.00\-;;_-* "-"??_-;;_-@_-
P;FArial;M200
P;FArial;M200
P;FArial;M200
P;FArial;M200
F;P0;DG0G8;M255
B;Y4;X1;D0 0 3 0
O;L;D;V0;K47;G100 0.001
F;W1 1 11
F;M270;R2
F;M285;R3
F;M270;R4
C;Y3;X1;Adid you notice this?
C;Y1;K"text"
F;Y2
F;SLRTBM0;Y3
C;K"text with box"
F;Y4
E
 
or try this:

Code:
ID;PWXL;N;E
P;PGeneral
P;P0
P;P0.00
P;P#,##0
P;P#,##0.00
P;P#,##0_-;;#,##0\-
P;P#,##0_-;;[Red]#,##0\-
P;P#,##0.00_-;;#,##0.00\-
P;P#,##0.00_-;;[Red]#,##0.00\-
P;P"$"\ #,##0_-;;"$"\ #,##0\-
P;P"$"\ #,##0_-;;[Red]"$"\ #,##0\-
P;P"$"\ #,##0.00_-;;"$"\ #,##0.00\-
P;P"$"\ #,##0.00_-;;[Red]"$"\ #,##0.00\-
P;P0%
P;P0.00%
P;P0.00E+00
P;P##0.0E+0
P;P#\ ?/?
P;P#\ ??/??
P;Pd/m/yyyy
P;Pd/mmm/yy
P;Pd/mmm
P;Pmmm/yy
P;Ph:mm\ AM/PM
P;Ph:mm:ss\ AM/PM
P;Ph:mm
P;Ph:mm:ss
P;Pd/m/yyyy\ h:mm
P;Pmm:ss
P;Pmm:ss.0
P;P@
P;P[h]:mm:ss
P;P_-"$"\ * #,##0_-;;_-"$"\ * #,##0\-;;_-"$"\ * "-"_-;;_-@_-
P;P_-* #,##0_-;;_-* #,##0\-;;_-* "-"_-;;_-@_-
P;P_-"$"\ * #,##0.00_-;;_-"$"\ * #,##0.00\-;;_-"$"\ * "-"??_-;;_-@_-
P;P_-* #,##0.00_-;;_-* #,##0.00\-;;_-* "-"??_-;;_-@_-
P;FArial;M200
P;FArial;M200
P;FArial;M200
P;FArial;M200
P;EArial;M200
P;EArial;M200
P;EArial;M200
F;P0;DG0G8;M255
B;Y9;X10;D0 0 8 9
O;L;D;V0;K47;G100 0.001
F;W1 1 11
F;M270;R2
F;M285;R3
F;M270;R4
C;Y3;X1;Adid you notice this?
C;Y1;K"text"
F;Y2
F;X2
F;X3
F;X4
F;X5
F;X6
F;X7
F;X8
F;X9
F;X10
F;SLRTBM0;Y3;X1
C;K"text with box"
F;X2
F;X3
F;X4
F;X5
F;X6
F;X7
F;X8
F;X9
F;X10
F;Y4;X1
F;X2
F;X3
F;X4
F;X5
F;X6
F;X7
F;X8
F;X9
F;X10
F;SLRTBSM0;Y5;X3
F;SLRTBSM0;X4
F;SLRTBSM0;X5
F;SLRTBSM0;X6
F;SLRTBSM0;X7
F;SLRTBSM0;X8
F;SLRTBSM0;X9
F;SLRTBSM0;X10
F;SLRTBSM0;Y6;X3
F;SLRTBM0;X4
F;SLRTBM0;X5
F;SLRTBM0;X6
F;SLRTBM0;X7
F;SLRTBM0;X8
F;SLRTBM0;X9
F;SLRTBSM0;X10
F;SLRTBSM0;Y7;X3
F;SLRTBM0;X4
F;SLRTBM0;X5
C;K"How does this look?"
F;SLRTBM0;X6
F;SLRTBM0;X7
F;SLRTBM0;X8
F;SLRTBM0;X9
F;SLRTBSM0;X10
F;SLRTBSM0;Y8;X3
F;SLRTBM0;X4
F;SLRTBM0;X5
F;SLRTBM0;X6
F;SLRTBM0;X7
F;SLRTBM0;X8
F;SLRTBM0;X9
F;SLRTBSM0;X10
F;SLRTBSM0;Y9;X3
F;SLRTBSM0;X4
F;SLRTBSM0;X5
F;SLRTBSM0;X6
F;SLRTBSM0;X7
F;SLRTBSM0;X8
F;SLRTBSM0;X9
F;SLRTBSM0;X10
E
 
Ciao Crox,

Thanks a lot for you explaination and your attention.
I try to use RPV tool and seems perfect to my purposes.

Ciao
Gianni
 
Hello,
When I need to do column syle reports in old dos style cobol I just write them as CSV files and then read them into Excel, auto fit the columns, and can then print or distribute the report. Most reports I do fit into this type of category.

Ejnoy Bob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top