View previous topic :: View next topic
|
Author |
Message |
brganeshbabu
New User
Joined: 23 Jun 2005 Posts: 34 Location: Chennai
|
|
|
|
Recently CICS was upgraded to 3.2 version. After this upgrade we found a problem in printing documents from CICS region. The CICS region gets the contents to be printed from Natural region and writes in TD QUEUE. I have stated the whole program below. I expedited the program online and it was throwing LENGERR. When I reduce the Length of the content to be written in WRITE TD QUEUE command, it gets printed partially. Could you please help me what has gone wrong. Is it related the version upgrade ? If so how to solve it.
Code: |
WORKING-STORAGE SECTION.
01 WORK-FIELDS.
05 QUEUE-LENGTH PIC S9(4) COMP VALUE ZEROS.
05 BUFF-SS PIC S9(4) COMP VALUE ZEROS.
01 CMN-WORK.
05 FILLER PIC X(12).
05 BUFFER-AREA.
10 BUFFER-LENGTH PIC S9(4) COMP.
10 NUMBER-OF-COPIES PIC S9(4) COMP.
10 BUFFER-LINE-AREA.
15 BUFFER-LINE OCCURS 66 TIMES.
20 EOB-IND PIC X(4).
20 FILLER PIC X(74).
EJECT
********************************************************
* L I N K A G E S E C T I O N *
********************************************************
SKIP2
EJECT
LINKAGE SECTION.
01 COMMON-TWA.
05 COMMUNICATION-AREA-ADDRESS USAGE IS POINTER.
01 POINTER-FIELDS.
05 DATA-POINTER USAGE IS POINTER.
01 COMMUNICATION-WORK.
05 COMM-WORK1.
10 PRINTER-ID PIC X(4).
10 RTRN-CODE PIC X(6).
10 FUNCTION-CODE PIC X(2).
05 COPY-COUNT PIC S9(2).
05 COMM-WORK2 PIC X(5148).
EJECT
PROCEDURE DIVISION.
MAIN-LINE SECTION.
EXEC CICS ADDRESS TWA(ADDRESS OF COMMON-TWA)
END-EXEC.
SET ADDRESS OF POINTER-FIELDS TO
COMMUNICATION-AREA-ADDRESS.
SET ADDRESS OF COMMUNICATION-WORK TO
DATA-POINTER.
MOVE COMM-WORK1 TO CMN-WORK.
MOVE COMM-WORK2 TO BUFFER-LINE-AREA.
IF COPY-COUNT NOT NUMERIC
MOVE +1 TO COPY-COUNT.
IF COPY-COUNT < +1
MOVE +1 TO COPY-COUNT.
MOVE COPY-COUNT TO NUMBER-OF-COPIES.
MOVE +1 TO BUFF-SS.
MOVE +4 TO QUEUE-LENGTH.
BUFFER-LOOP.
IF BUFF-SS > +66
GO TO WRITE-QUEUE.
IF EOB-IND (BUFF-SS) = HIGH-VALUES
GO TO WRITE-QUEUE.
ADD +78 TO QUEUE-LENGTH.
ADD +1 TO BUFF-SS.
GO TO BUFFER-LOOP.
WRITE-QUEUE.
********************************************************
* W R I T E Q U E U E R E C O R D *
********************************************************
SKIP1
MOVE QUEUE-LENGTH TO BUFFER-LENGTH.
EXEC CICS
WRITEQ TD QUEUE(PRINTER-ID)
FROM(BUFFER-AREA)
LENGTH(QUEUE-LENGTH)
END-EXEC.
RETURN-TO-NATURAL.
MOVE EIBRCODE TO RTRN-CODE
MOVE EIBFN TO FUNCTION-CODE.
EXEC CICS RETURN
END-EXEC.
GOBACK. |
Thanks,
Ganesh |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
What is the value of QUEUE-LENGTH when the WRITEQ TD is issued and causing the message-truncation?
Bill |
|
Back to top |
|
|
brganeshbabu
New User
Joined: 23 Jun 2005 Posts: 34 Location: Chennai
|
|
|
|
Value is 4294. It is printing just 2 pages of document. When I make it to 3000 it works fine. Before the upgrade we were able to print. |
|
Back to top |
|
|
Earl Haigh
Active User
Joined: 25 Jul 2006 Posts: 475
|
|
|
|
First of all, this irriates my OL' mainframe mindset.
Quote: |
I expedited the program online and it was throwing LENGERR |
Mainframers normally do not use the "THROW" terminology introduced by a bunch of JAVA heads. Mainframers either "display", "return", or "post" responses.
2nd
talk to your CICS support group. Since your are writing to a TDQ,
that is invoking a print process, then I would assume there is trigger
Transaction that is reading the Q and performing the actual print.
I'm guessing that for whatever reason, the maximum size of
the defined TDQ record length has been changed or the Print transaction
itself does not like TDQ records longer than 3000 bytes. |
|
Back to top |
|
|
brganeshbabu
New User
Joined: 23 Jun 2005 Posts: 34 Location: Chennai
|
|
|
|
Hi Earl,
Thanks for your response ! BTW, I have worked on VB, Java and now working in mainframe. That is the reason I used the word "Throwing an error"
Thanks,
Ganesh |
|
Back to top |
|
|
aemontero
New User
Joined: 04 Nov 2009 Posts: 7 Location: Caracas, Venezuela
|
|
|
|
Hi
The problem is in the recordsize parameter of the TDQ, check with your CICS system programmer
|
|
Back to top |
|
|
|