×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Compound PDF

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.

RE: Compound PDF

I think I need some clarification. You say you have an 8 page compound PDF output, by passing in a SSN. Is that 8 separate reports, or one report with 8 pages, or some other combination (I suspect 8 separate reports)?

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

(OP)
Hi focwizard,

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

(OP)
Hi focwizard,

Need your help of how to read the SSN in hold file 1 by 1 in a loop ?

Thanks.

2Wayparadise

RE: Compound PDF

Ah, now I see. You just want to loop through a list of SSNs in a file, and execute this procedure for each SSN you read, and have the entire output as a single PDF document. Is that it?

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

TABLE FILE holdfile
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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close