Compound PDF
Compound PDF
(OP)
I have a 8 pages compound PDF was gererated by passing a SSN as the required parameter.
I like to run a batch of SSNs which is created by State code. Example is in state of 'CA', I have 21 SSNs pull and was created in a comma delimited file format like
"SSN1,SSN2,SSN3,..."
How do I read the SSN file with 1 by 1 of the SSN pass to my compound PDF fex and keep all 8 pages within the same SSN together.
Thanks.
I like to run a batch of SSNs which is created by State code. Example is in state of 'CA', I have 21 SSNs pull and was created in a comma delimited file format like
"SSN1,SSN2,SSN3,..."
How do I read the SSN file with 1 by 1 of the SSN pass to my compound PDF fex and keep all 8 pages within the same SSN together.
Thanks.
RE: Compound PDF
Now, you want to pass MULTIPLE SSNs to the report, and group them by state. Is that correct? Thus, each of the different reports will include all the SSNs for that state. Is there one report with all the SSNs, or one page or each report per SSN?
Do you want 'like' reports together, or 8 reports for SSN1, followed by 8 reports for SSN2, etc.
Ultimately, it sounds like you need a loop, controlled by the Dialogue Manager.
RE: Compound PDF
I have 1 focexex produce 8 pages of PDF which have different info by joining to additional table. when I
EX PDF8P SSN='123456789' it will produce 8 pages compound PDFs
Now I have a STATE ID, example: CA, it contains 9 SSNs
in a holding file like
CA SSN
-- ---------
CA 111111111
CA 222222222
CA 333333333
.
.
.
CA 99999999
How do I read each of the SSN and pass it to my PDF8P as a parameter and loop thought all 9 SSNs and produce a total of 72 Pages of compound PDF in 1 execution
The PDF should be in SSN=111111111,P1 to P8 and SSN=222222222, P1-P8, SSN=333333333, P1-P8...
Thanks for your help
2wayparadise
RE: Compound PDF
Need your help of how to read the SSN in hold file 1 by 1 in a loop ?
Thanks.
2Wayparadise
RE: Compound PDF
First, you should create a HOLD file (in ALPHA format), of the SSNs you want. Keep the number of records (&LINES) in a different variable (&NUMSSNS). Then, use the Dialogue Manager to read the list, one at a time, and process them.
It might look like this:
CODE
PRINT SSN
ON TABLE HOLD AS SSNLIST FORMAT ALPHA
END
-RUN
-SET &NUMSSNS = &LINES;
-IF &LINES EQ 0 GOTO EXIT;
-REPEAT ENDLOOP FOR &CTR FROM 1 TO &NUMSSNS
-READ SSNLIST NOCLOSE &SSN.A9.
-SET &OPENCLOSE = IF &NUMSSNS EQ 1 THEN ' ' ELSE
- IF &CTR EQ 1 THEN 'OPEN' ELSE
- IF &CTR EQ &NUMSSNS THEN 'CLOSE' ELSE ' ';
-IF &OPENCLOSE EQ ' ' GOTO NOSET;
SET COMPOUND = &OPENCLOSE
-NOSET
EX PDF8P SSN=&SSN
-RUN
-ENDLOOP
What this does is:
&NUMSSNS is used to determine WHEN COMPOUND should be set to 'CLOSE' (on the last report). The first report has COMPOUND set to OPEN; intermediate reports don't set it at all. And, if &NUMSSNS is 1, you don't HAVE a compound report.
The -READ has a NOCLOSE option, so that file stays open, allowing you to read the 'next' record.