Dynamic FORMS for AFP printing

I am trying to print AFP for sysout, but the FORMS parameter is unknown (and cannot be known) by JCL. My current solution is to create a dynamic JCL and include it in INTRDR, but this is a weak solution, because the work will not be under the control of our scheduler ... and thus, the abend problem or other problem will go unnoticed by the night time operators.

I began to come up with a way to print AFP through the COBOL program. I use BPXWDYN to dynamically create SYSOUT DD, which allows me to set the FORMS parameter, but I want to. But the next step is to reset the AFP to this DD.

I thought I could dynamically call IEBGENER from my COBOL program, but that calls S0C4.

I can move AFP records from one DD to another in COBOL, but this limits me to one LRECL ... and I have many different LRECL definitions for AFP in my system, and COBOL MUST know LRECL at compile time.

Any thoughts? Is it possible to dynamically call IEBGENER and not get S0C4? Any other ideas that I haven't thought about?

Thanks in advance...

+4
source share
2 answers

Have you ever thought of writing a small assembler program? You can specify LRECL in a call to BPXWDYN, and DCB does not need to specify LRECL; he will get it from the DCB parameters in OPEN. The program to simulate IEBGENER is pretty trivial.

Also, look at the SORT call with the FIELDS = COPY parameter. SORT also does not need LRECL. Or write a REXX script.

There are many ways to do this; you just need to look outside the COBOL field.

+3
source

Your question is not very clear, but I wonder if you should use the ACIF utility called APKACIF instead of IEBGENR. The utility will combine your data and enable AFP FORMDEF, PAGEDEF objects in a dataset or print stream. A.

0
source

Source: https://habr.com/ru/post/1495345/


All Articles