View previous topic :: View next topic
|
Author |
Message |
Madhu Reddy
New User
Joined: 28 Sep 2006 Posts: 56
|
|
|
|
Hi ,
The below is the Jcl Eazytrieve pgm
//SYSIN DD *
FILE DUPFILE FB(160, 1600)
DEPT 1 3 N
NAME 4 8 A
EMP# 12 6 N
GROSS 18 7 N 2
FILE PAYFILE FB(160, 1600)
DEPT 1 3 N
NAME 4 8 A
EMP# 12 5 N
GROSS 18 7 N 2
JOB INPUT DUPFILE NAME PAY-RPT
SORT DUPFILE TO PAYFILE USING DEPT
PRINT PAY-RPT
REPORT PAY-RPT LINESIZE 80
TITLE 01 'EMPLOYEE INFO'
LINE 01 DEPT NAME EMP# GROSS
When i run this code i am getting the below error
*******B014 UNABLE TO RECOGNIZE STATEMENT
Could anyone suggest me the solution
Thanks |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Madhu Reddy wrote: |
When i run this code i am getting the below error
*******B014 UNABLE TO RECOGNIZE STATEMENT |
Quote: |
B014 UNABLE TO RECOGNIZE STATEMENT - word
The indicated statement is not recognizable as a CA-Easytrieve/Plus source or control statement. The optional supplemental message indicates the invalid statement. If the supplemental message is not present, the entire jobstream is unrecognizable and the input is flushed. |
|
|
Back to top |
|
|
IQofaGerbil
Active User
Joined: 05 May 2006 Posts: 183 Location: Scotland
|
|
|
|
If I understand your requirement, it is to print the input DUPFILE sorted on DEPT?
If that is corrrect then you do not need the SORT statement nor the PAYFILE.
All you need to do is insert
SEQUENCE DEPT
as the next line after the REPORT statement, Easytrieve will do the rest for you.
eg
Code: |
FILE DUPFILE FB(80, 8000)
DEPT 1 3 N
NAME 4 8 A
EMP# 12 6 A
GROSS 18 7 A
JOB INPUT DUPFILE
PRINT PAY-REP
REPORT PAY-REP LINESIZE 132 PAGESIZE 61
SEQUENCE DEPT
TITLE 01 'EMPLOYEE INFO'
LINE 01 DEPT NAME EMP# GROSS
|
|
|
Back to top |
|
|
priyamnavada
New User
Joined: 24 Dec 2005 Posts: 52 Location: hyderabad
|
|
|
|
as far as my knowledge, the file variables should be distinct. try this once- by giving different file records,....
for example,
FILE DUPFILE FB(160, 1600)
I-DEPT 1 3 N
I-NAME 4 8 A
I-EMP# 12 6 N
I-GROSS 18 7 N 2
FILE PAYFILE FB(160, 1600)
O-DEPT 1 3 N
O-NAME 4 8 A
O-EMP# 12 5 N
O-GROSS 18 7 N 2 |
|
Back to top |
|
|
G-Johnson
New User
Joined: 12 Mar 2007 Posts: 20 Location: USA
|
|
|
|
the sort has to be performed before the job statement. |
|
Back to top |
|
|
lcmontanez
New User
Joined: 19 Jun 2007 Posts: 50 Location: Chicago
|
|
|
|
priyamnavada wrote: |
as far as my knowledge, the file variables should be distinct. try this once- by giving different file records,....
|
FYI, field names do not need to be distinct.
To reference duplicate field names prefix the name with the filename
(ex) Dupfile:Dept or Payfile:Dept |
|
Back to top |
|
|
|