IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Partition JES2 output


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
TPGMNJP

New User


Joined: 18 Apr 2006
Posts: 3

PostPosted: Fri Jul 21, 2006 12:28 am
Reply with quote

Hello everyone,

This is my first post & of course I need a bit of help.

My shop uses Vista Plus Windows Client as a report viewer. We route all of our reports from JES2 using:

/*ROUTE PRINT QUESTM
.
.
.
//STEP001 EXEC PGM=PROGNAM1
//PRINTER DD SYSOUT=(Q,PROGRAM1),DEST=QUESTQ
.
.
.
Here's the problem; After being assured that the product can handle any size report, we've found out that there is a limit and some of our reports exceed that limit. I was looking for a way in the JCL to partition the report with a page or line count.

I've studied the OUTPUT statement and it appears that the parameters I could use are only available in JES3.

I know I could modify the program and write multiple DD's, or write the output to disk and reprint it in smaller chunks with a utility, but that's a bit messy and I'd like to avoid that.

I've studied the OUTPUT statement and it appears that the THRESHHOLD parameter works only in JES3.

Is there some other method I can use that I've overlooked?

Thanks,

Nick
Back to top
View user's profile Send private message
TPGMNJP

New User


Joined: 18 Apr 2006
Posts: 3

PostPosted: Fri Jul 21, 2006 8:02 pm
Reply with quote

Bueller........Bueller........Bueller........
Back to top
View user's profile Send private message
TPGMNJP

New User


Joined: 18 Apr 2006
Posts: 3

PostPosted: Tue Jul 25, 2006 8:33 pm
Reply with quote

In case anyone is interested, after much trial and error, I managed to break up the sysout using BPXWDYN. Here's the test code:

I set it up to be parameter driven, and of course some of the code is inhouse specific, but not the BPXWDYN calls.

Code:

IDENTIFICATION DIVISION.
PROGRAM-ID. NPDYNTSO.
ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
    SELECT PRINTER     ASSIGN       TO PRINTER
                       FILE STATUS  IS FILE-STATUS.

DATA DIVISION.
FILE SECTION.
FD  PRINTER
    RECORDING F
    LABEL RECORD STANDARD
    BLOCK CONTAINS 0 RECORDS.
01  PRINTER-REC                 PIC  X(80).

WORKING-STORAGE SECTION.
01  WS-MISC.
    05  FILE-STATUS             PIC  X(02).
    05  PROGRAM-ABEND-SW        PIC  X(01)  VALUE 'Y'.
        88  PROGRAM-ABEND                   VALUE 'Y'.
    05  PRINTER-WRITES          PIC  9(08)  VALUE ZERO.
    05  WS-OUTDES               PIC  X(08)  VALUE 'SYSOUT'.
    05  WS-DEST                 PIC  X(08)  VALUE 'NICKSQ'.
    05  WS-DD                   PIC  X(08)  VALUE 'PRINTER'.
    05  WS-CLASS                PIC  X(08)  VALUE 'H'.
    05  WS-WTR                  PIC  X(08)  VALUE 'NICKWTR'.

01  BPX-MISC.
    05  BPX-RC                  PIC  9(08)  BINARY.
    05  BPX-RC-DISP             PIC  9(08).
    05  BPX-CMD.
        10  BPX-CMD-LEN         PIC S9(04)  BINARY.
        10  BPX-CMD-TXT         PIC X(200)  VALUE SPACE.

01  WS-ABEND-INF0.
    05  WS-PROG-ID              PIC  X(08)  VALUE 'NPDYNTSO'.
    05  WS-ABEND-CODE.
        10  WS-ABEND-NBR1       PIC  9(04)  VALUE ZERO.
        10  FILLER              PIC  X(01)  VALUE '-'.
        10  WS-ABEND-NBR2       PIC  9(02)  VALUE ZERO.
    05  WS-ABEND-TEXT           PIC  X(80).

PROCEDURE DIVISION.
    PERFORM 1000-INITIALIZE

    ADD 1 TO WS-ABEND-NBR2
    PERFORM 2000-ALLC-DES
    PERFORM 2005-ALLC-DD
    PERFORM 2010-OPEN-PRINTER
    MOVE WS-ABEND-NBR2                      TO PRINTER-REC
    MOVE 'THIS IS THE OUTPUT PRINT RECORD ' TO PRINTER-REC (04:)
    PERFORM 2015-WRITE-PRINTER
    PERFORM 2020-CLOSE-PRINTER
    PERFORM 2025-FREE-DD
    PERFORM 2030-FREE-DES

    ADD 1 TO WS-ABEND-NBR2
    PERFORM 2000-ALLC-DES
    PERFORM 2005-ALLC-DD
    PERFORM 2010-OPEN-PRINTER
    MOVE WS-ABEND-NBR2                      TO PRINTER-REC
    MOVE 'THIS IS THE OUTPUT PRINT RECORD' TO PRINTER-REC (04:)
    PERFORM 2015-WRITE-PRINTER
    PERFORM 2020-CLOSE-PRINTER
    PERFORM 2025-FREE-DD
    PERFORM 2030-FREE-DES

    MOVE 'N' TO PROGRAM-ABEND-SW
    PERFORM 9000-EOJ
    .
1000-INITIALIZE.
    DISPLAY '**'
    DISPLAY '** NPDYNTSO: START PROGRAM'
    DISPLAY '**'
    .
2000-ALLC-DES.
    MOVE 2000   TO WS-ABEND-NBR1
    MOVE SPACES TO BPX-CMD-TXT
    STRING 'OUTDES('             DELIMITED BY SIZE
           WS-OUTDES             DELIMITED BY SPACE
           ') DEST('             DELIMITED BY SIZE
           WS-DEST               DELIMITED BY SPACE
           ')'                   DELIMITED BY SIZE
      INTO BPX-CMD-TXT
    PERFORM 3000-CALL-BPXWDYN
    .
2005-ALLC-DD.
    MOVE 2005   TO WS-ABEND-NBR1
    MOVE SPACES TO BPX-CMD-TXT
    STRING 'ALLOC DD('           DELIMITED BY SIZE
           WS-DD                 DELIMITED BY SPACE
           ') SYSOUT('           DELIMITED BY SIZE
           WS-CLASS              DELIMITED BY SPACE
           ') WRITER('           DELIMITED BY SIZE
           WS-WTR                DELIMITED BY SPACE
           ') OUTDES('           DELIMITED BY SIZE
           WS-OUTDES             DELIMITED BY SPACE
           ')'                   DELIMITED BY SIZE
      INTO BPX-CMD-TXT
    PERFORM 3000-CALL-BPXWDYN
    .
2010-OPEN-PRINTER.
    OPEN OUTPUT PRINTER
    IF FILE-STATUS NOT = ZERO
      MOVE 2010                    TO WS-ABEND-NBR1
      MOVE FILE-STATUS             TO WS-ABEND-TEXT
      MOVE 'PRINTER OPEN ERROR'    TO WS-ABEND-TEXT (04:)
      PERFORM 9000-EOJ
    END-IF
    .
2015-WRITE-PRINTER.
    WRITE PRINTER-REC
    IF FILE-STATUS = ZERO
      ADD 1 TO PRINTER-WRITES
    ELSE
      MOVE 2015                    TO WS-ABEND-NBR1
      MOVE FILE-STATUS             TO WS-ABEND-TEXT
      MOVE 'PRINTER WRITE ERROR'   TO WS-ABEND-TEXT (04:)
      PERFORM 9000-EOJ
    END-IF
    .
2020-CLOSE-PRINTER.
    CLOSE PRINTER
    .
2025-FREE-DD.
    MOVE 2025   TO WS-ABEND-NBR1
    MOVE SPACES TO BPX-CMD-TXT
    STRING 'FREE DD('            DELIMITED BY SIZE
           WS-DD                 DELIMITED BY SPACE
           ')'                   DELIMITED BY SIZE
      INTO BPX-CMD-TXT
    PERFORM 3000-CALL-BPXWDYN
    .
2030-FREE-DES.
    MOVE 2030   TO WS-ABEND-NBR1
    MOVE SPACES TO BPX-CMD-TXT
    STRING 'FREE OUTDES('        DELIMITED BY SIZE
           WS-OUTDES             DELIMITED BY SPACE
           ')'                   DELIMITED BY SIZE
      INTO BPX-CMD-TXT
    PERFORM 3000-CALL-BPXWDYN
    .
3000-CALL-BPXWDYN.
    DISPLAY BPX-CMD-TXT
    COMPUTE BPX-CMD-LEN = LENGTH OF BPX-CMD
                         - LENGTH OF BPX-CMD-LEN
    CALL 'BPXWDYN' USING BPX-CMD RETURNING BPX-RC
    IF BPX-RC NOT = ZERO
      MOVE BPX-RC                  TO BPX-RC-DISP
      MOVE BPX-RC-DISP             TO WS-ABEND-TEXT
      MOVE 'BPX FAIL:'             TO WS-ABEND-TEXT (10:)
      MOVE BPX-CMD-TXT             TO WS-ABEND-TEXT (20:)
      PERFORM 9000-EOJ
    END-IF
    .
9000-EOJ.
    CLOSE PRINTER

    DISPLAY '**'
    DISPLAY '** NPQPMV1C: PRINTER WRITES    - ' PRINTER-WRITES
    DISPLAY '**'

    IF PROGRAM-ABEND
      DISPLAY '** NPDYNTSO: ABNORMAL PROGRAM TERMINATION'
      DISPLAY '**'
      CALL 'KUCANXA' USING WS-PROG-ID
                           WS-ABEND-CODE
                           WS-ABEND-TEXT
    ELSE
      DISPLAY '** NPDYNTSO: NORMAL PROGRAM TERMINATION'
      DISPLAY '**'
      GOBACK
    END-IF
    .
Back to top
View user's profile Send private message
Bharanidharan

New User


Joined: 20 Jun 2005
Posts: 86
Location: Chennai, India

PostPosted: Wed Jul 26, 2006 8:58 pm
Reply with quote

I may be stoned on glass but I am baffled about this BPXWDYN. I can't seem to find this in my system libraries nor can I find in my application load libs. Would you please shed some more light on this?
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts DROP & ALTER PARTITION-PBR DB2 0
No new posts Rotate partition-logical & physic... DB2 0
No new posts Joinkeys - 5 output files DFSORT/ICETOOL 7
Search our Forums:

Back to Top