View previous topic :: View next topic
|
Author |
Message |
Achroo
New User
Joined: 07 Jan 2008 Posts: 7 Location: noida
|
|
|
|
I have declared a file as table for sequential file, then i am facing this error in SEARCH statement ....
FILE cdd
..
..
FILE xyz
abc
..
...
FILE XYZ1 table
arg ..
desc ..
CDD1 AND W-CDD ARE WORKING STORAGE VARAIBLE
sort xyz to XYZ1 using abc
job input cdd
SEARCH XYZ1 WITH CDD1 GIVING W-CDD
ABend with CC16 is coming in above line
TIA |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
It will probably help if you post more of the code as well as the execute jcl for this run. |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
Achroo wrote: |
ABend with CC16 is coming in above line |
CA Products?
What is the environment? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Easytrieve |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
Yea, the criptic example hid that from me....
What is the description of the variables involved?
XYZ1?
arg?
desc?
CDD1?
W-CDD? |
|
Back to top |
|
|
lcmontanez
New User
Joined: 19 Jun 2007 Posts: 50 Location: Chicago
|
|
|
|
Did you load a value into CDD1 (WS field not input field).
need more info. |
|
Back to top |
|
|
Achroo
New User
Joined: 07 Jan 2008 Posts: 7 Location: noida
|
|
|
|
FILE EMP
EMP-NO 1 5 A
EMP-NAME 6 10 A
EMP-DEP-NO 16 5 A
EMP-SAL 21 4 P 2
FILE EMPS
EMPS-NO 1 5 A
EMPS-NAME 6 10 A
EMPS-DEP-NO 16 5 A
EMPS-SAL 21 4 P 2
FILE DEP
DEP-NO 1 5 A
DEP-NAME * 8 A
DEP-ADDR * 20 A
FILE DEPS
DEPS-NO 1 5 A
DEPS-NAME * 8 A
DEPS-ADDR * 20 A
FILE DEPT TABLE
ARG 1 5 A
DESC 6 8 A
WS-DEP-NO W 5 A
FIN-DEP-NO W 5 A
FIN-DEP-NAME W 8 A
FIN-MIN-SAL W 4 P 2
FIN-MIN-NO W 5 A
FIN-MAX-SAL W 4 P 2
FIN-MAX-NO W 5 A
FIN-AVG W 4 P 2
WS-SUM W 5 P 2
WS-FLAG2 W 1 A VALUE '0'
WS-COUNT W 2 P 0
WS-COUNT1 W 2 P 0
SORT EMP TO EMPS +
USING(EMP-DEP-NO)
SORT DEP TO DEPS +
USING(DEP-NO)
SORT DEPS TO DEPT +
USING(DEPS-NO)
JOB INPUT EMPS +
FINISH(END-REP)
MOVE EMPS-DEP-NO TO WS-DEP-NO
IF WS-FLAG2 NE '1'
WS-COUNT1 = 0
MOVE EMPS-DEP-NO TO FIN-DEP-NO
END-IF
IF FIN-DEP-NO NE WS-DEP-NO OR WS-FLAG2 NE '1'
IF WS-COUNT NE 0 AND WS-FLAG2 EQ '1'
FIN-AVG = WS-SUM / WS-COUNT
END-IF
IF WS-FLAG2 EQ '1'
PRINT RPT-EMP1
WS-COUNT1 = WS-COUNT1 + WS-COUNT
END-IF
MOVE '1' TO WS-FLAG2
WS-COUNT = 0
MOVE SPACES TO FIN-MIN-NO, FIN-MAX-NO
WS-SUM = 0
FIN-MIN-SAL = EMPS-SAL
FIN-MAX-SAL = EMPS-SAL
END-IF
PERFORM DEP-CALC-PARA
IF NOT EOF EMPS
GO TO JOB
END-IF
END-REP. PROC
PRINT RPT-EMP2
END-PROC
DEP-CALC-PARA. PROC
SEARCH DEPT WITH WS-DEP-NO GIVING FIN-DEP-NAME
..............
SYSPRINT DUMP
3/06/08 23.18.36 CA-EASYTRIEVE PLUS-6.4 0311
Computer Associates - Common Services Installa
PROGRAMS AND ALL SUPPORTING MATERIALS COPYRIGHT (C) 1982, 1996 BY COMPUTER ASSOC
69 *******B054 NOT A VALID FILE - DEPT
*******A014 PREMATURE TERMINATION DUE TO PREVIOUS ERROR(S) |
|
Back to top |
|
|
lcmontanez
New User
Joined: 19 Jun 2007 Posts: 50 Location: Chicago
|
|
|
|
There are line numbers on the left side of each command line in the sysout. Which line is 69? |
|
Back to top |
|
|
lcmontanez
New User
Joined: 19 Jun 2007 Posts: 50 Location: Chicago
|
|
|
|
In addition, there are counts at the end of the sysout. Can you please
display them.
Did the sort load the DEPT (the count should verify this)? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Posting all of the jcl would probably help as well. |
|
Back to top |
|
|
|