1

Using DDS I know I can print a box and color it in using the the BOX keyword:

A          R BOX5                      BOX(2.5 0.5 5.1 6.3 0.2 +
A                                      (*COLOR *HIGHLIGHT 3 75)

Is there something similar to create a circle?

geojf3
  • 45
  • 6

1 Answers1

3

According to the DDS Reference: No. I can't find any keywords to directly draw a circle.

My guess is that back in the heyday of high volume impact printers, there was no fast way to print such circles. Note: Impact isn't necessarily the same as dot-matrix printers. Lines were possible with special characters, though. The "language" to steer such a printer was called SCS (SNA Character String).

But you can create a circle as desired with external programs, convert the result to a page segment, using specialized IBM software, and load that via DDS onto a page. See the PAGSEG keyword on the linked documentation for information and caveats. Especially the need to use AFP might pose a serious obstacle. (AFP is — overly simplified and thus not entirely correct — like PCL or PostScript, a page description language. IPDS can be roughly seen as equivalent to PJL.) Ricoh printers sometimes have native IPDS/AFP support. Also, there were some manufacturers for converter boxes, faking an SCS or even IPDS/AFP printer to the host side, and appearing as a PJL/PCL printer data generator to the printer.

The built-in Host Print Transform feature which can be enabled for printer devices converts the spooled output to PCL, so it can be sent to stock printers. The drawback is, it uses local CPU resources which might not be desired. Older releases of the OS might only support SCS with Host Print Transform.

Newer IBM I releases include InfoPrint Server, a java-based background task enabling to convert print jobs on the machine to PDF. I assume this should work with AFP. Not talking about resource usage, though…

Printing on IBM i is a deep rabbit hole in itself. See the accompanying documentation.

PoC
  • 521
  • 3
  • 13
  • Thank you for that. Maybe I am looking at this wrong. We currently print forms (using AFPDS) and we want to add a few symbols to certain sections (small squares/boxes of different colors, capital letters of different colors and small circles of different colors). The boxes and letters I found I could do using the BOX and COLOR keywords, thats why I was hoping for a similar answer. Is there a better way to get what I am looking for? – geojf3 May 29 '21 at 13:37
  • consider switching to printing your form as a PDF document. I have used the `jsPDF` javascript library. But you can use `PHP` to do this. Then use the `HTTPGETCLOB` sql function to call the PHP program ( web service ) that would create the PDF file and write it to the IFS. – RockBoro May 29 '21 at 14:35
  • 1
    @RockBoro Since he's talking about DDS, I assume he's mantaining an existing application. Your proposal might need a major application rewrite. This isn't always an option, for many reasons. – PoC May 30 '21 at 10:15
  • 1
    @geojf3: See my answer, maybe page segments might be the way to go forward. – PoC May 30 '21 at 10:49
  • @geojf3 Whether you will get what you want with AFP depends on how flexible you want your colors, circles, and capitals to be. I have had good results drawing forms in AutoCAD, printing them to a file in color as an overlay using the generic IBM print driver, copying that print file to a member, and running CRTOVL to create an overlay to override on a print file. IBM's CPYSPLF or Gumbo's SPLCONVERT can then put the graphics into a pdf file. This works well if you only require fixed locations for your graphics. If you want the colored circles to move with your text, this is not a solution. – Mike Jun 02 '21 at 14:50
  • What seems not possible (and strange) is when you already have the file (IFS) in the printer language (say DDS or PCL5), and just make the last step: print. It's possible to do more complex (render spool to pcl, pdf for emailing...) but not simple steps... :( iSeries – Sandburg Aug 08 '22 at 13:49
  • @Sandburg DDS is not a printer language. What exactly do you meant by "the file"? What should it contain? Sorry, but your remark seems outright confusing to me. – PoC Aug 09 '22 at 14:06