View previous topic :: View next topic
Author
Message
avaneendra_linga New User Joined: 13 Dec 2006Posts: 73 Location: Hyderabad
hi i have written SORT card for HEADER AND TRAILER CREATION .
I AM GETTING REPORT FIELD ERROR, CAN ANYBODY HELP ON THIS.
I AM GETTING THIS ERROR AT TRAILER1
Code:
OPTION COPY
OUTFIL REMOVECC,HEADER1=(1:C'H',
02:C' ',
06:C' ',
14:C' ',
22:C'00380',
27:C' ',
32:C' ',
40:C' ',
48:C'RX SOLUTIONS ',
64:C' ',
74:C' ',
75:C' ',
77:C'01',
79:C'01',
81:C'F',
82:C' ',
90:C' ',
95:C'COUNT+2=(M11,LENGTH=8))',
TRAILER1=(1:C'T',
02:C' ',
06:C' ',
14:C' ',
22:C'00380',
27:C' ',
32:C'',
40:C'',
48:C'RX SOLUTIONS ',
64:C' ',
74:C'COUNT+2=(M11,LENGTH=8)')
Back to top
William Thompson Global Moderator Joined: 18 Nov 2006Posts: 3156 Location: Tucson AZ
avaneendra_linga wrote:
hi i have written SORT card for HEADER AND TRAILER CREATION .
I AM GETTING REPORT FIELD ERROR, CAN ANYBODY HELP ON THIS.
I AM GETTING THIS ERROR AT TRAILER1
What exactally is the error number and exact text?
Code:
02:C' ',
06:C' ',
14:C' ',
Why all the various sized blank definition?
Back to top
avaneendra_linga New User Joined: 13 Dec 2006Posts: 73 Location: Hyderabad
HI THIS IS THE ERROR I AM GETTING....
Code:
TRAILER1=(1:C'T',
$
ICE223A 0 REPORT FIELD ERROR
Back to top
manihcl85 Warnings : 1 New User Joined: 11 Jan 2007Posts: 52 Location: chennai
Hi,
The mistake u did is
OPTION COPY
OUTFIL REMOVECC,HEADER1=(1:C'H',
02:C' ',
06:C' ',
14:C' ',
22:C'00380',
27:C' ',
32:C' ',
40:C' ',
48:C'RX SOLUTIONS ',
64:C' ',
74:C' ',
75:C' ',
77:C'01',
79:C'01',
81:C'F',
82:C' ',
90:C' ',
95:C'COUNT+2=(M11,LENGTH=8))', /*the quotes should come before last brace */
TRAILER1=(1:C'T',
02:C' ',
06:C' ', /*here ur having 5 spaces
14:C' ',
22:C'00380',
27:C' ',
32:C'', /*syntax is not correct
40:C'', /*syntax is not correct
48:C'RX SOLUTIONS ',
64:C' ',
74:C'COUNT+2=(M11,LENGTH=8)')
Let me knew still u face problem.
Regards,
Mani
Back to top
Frank Yaeger DFSORT Developer Joined: 15 Feb 2005Posts: 7129 Location: San Jose, CA
aveneedra,
Here's a version of your control statements that will work:
Code:
OPTION COPY
OUTFIL REMOVECC,HEADER1=(1:C'H',
02:C' ',
06:C' ',
14:C' ',
22:C'00380',
27:C' ',
32:C' ',
40:C' ',
48:C'RX SOLUTIONS ',
64:C' ',
74:C' ',
75:C' ',
77:C'01',
79:C'01',
81:C'F',
82:C' ',
90:C' ',
95:C'COUNT+2=(M11,LENGTH=8))'),
TRAILER1=(1:C'T',
02:C' ',
06:C' ',
14:C' ',
22:C'00380',
27:C' ',
32:C' ',
40:C' ',
48:C'RX SOLUTIONS ',
64:C' ',
74:C'COUNT+2=(M11,LENGTH=8)')
Here's a better version of your control statements:
Code:
OPTION COPY
OUTFIL REMOVECC,HEADER1=(1:C'H',
22:C'00380',
48:C'RX SOLUTIONS ',
77:C'01',
79:C'01',
81:C'F',
95:C'COUNT+2=(M11,LENGTH=8))'),
TRAILER1=(1:C'T',
22:C'00380',
48:C'RX SOLUTIONS ',
74:C'COUNT+2=(M11,LENGTH=8)')
Back to top
manihcl85 Warnings : 1 New User Joined: 11 Jan 2007Posts: 52 Location: chennai
Dear Frank,
i think number of closing brace in header segment is more than number of open brace.
Regards,
Mani
Back to top
avaneendra_linga New User Joined: 13 Dec 2006Posts: 73 Location: Hyderabad
HI,
FOR ME COUNT FUNCTIONALITY IS NOT WORKING IN HEADER........
FOR THE SAME CODE THAT WAS MENTIONED BY FRANK...
CAN ANYBODY HELP ON THAT....
CAN WE DO THE COUNT IN HEADER RECORD.....
Back to top
Frank Yaeger DFSORT Developer Joined: 15 Feb 2005Posts: 7129 Location: San Jose, CA
Mani wrote
Quote:
i think number of closing brace in header segment is more than number of open brace
If you're referring to my job, then you're wrong. For HEADER1, there's one open paren at the start and one close paren at the end. Avaneedra's:
C'COUNT+2=(M11,LENGTH=8))'
has mismatched parens, but since it's within a constant, DFSORT doesn't care.
Back to top
Frank Yaeger DFSORT Developer Joined: 15 Feb 2005Posts: 7129 Location: San Jose, CA
Aveenadra,
No you can't use COUNT in HEADERx, only in TRAILERx. But you're NOT using COUNT since you have it in a constant:
C'COUNT+2=(M11,LENGTH=8))'
DFSORT just treats this a a string - it doesn't care what's between the apostrophes. If you had COUNT outside of the constant, then it wouldn't work in HEADERx, only in TRAILERx.
Back to top
Please enable JavaScript!