View previous topic :: View next topic
Author
Message
Mahua Mitra New User Joined: 26 Apr 2007Posts: 49 Location: Delhi
Hi
I have variable block file for both input and output. The sort card has the following:
Code:
SORT FIELDS=COPY
INCLUDE COND=(3,08,CH,EQ,C'KE64 ADD')
OUTREC FIELDS=(01:01,04,
05:257,04,PD,EDIT=(TTTTTTT-),
13:264,08,PD,EDIT=(TTTTTTTTTTTTTTT-),
29:285,07,PD,EDIT=(TTTTTTTTTTTTT-))
and in the input file , there are 3 such data where the condition gets satisfied. But still I am getting ana empty output file.
Please suggest.
Thanks
Back to top
William Thompson Global Moderator Joined: 18 Nov 2006Posts: 3156 Location: Tucson AZ
If the input is VB, you must account for the llbb, if the include field is the third byte, its actual displacement is 7, not 3.....
Back to top
Mahua Mitra New User Joined: 26 Apr 2007Posts: 49 Location: Delhi
Hi
Can you please explain this:
"you must account for the llbb, if the include field is the third byte, its actual displacement is 7, not 3"
Thanks
Back to top
William Thompson Global Moderator Joined: 18 Nov 2006Posts: 3156 Location: Tucson AZ
Like your output: 01:01,04; your real input data starts after the first four bytes containing the RDW.
Back to top
krisprems Active Member Joined: 27 Nov 2006Posts: 649 Location: India
Back to top
Anuj Dhawan Superior Member Joined: 22 Apr 2006Posts: 6250 Location: Mumbai, India
Hi,
You may need this information:
RDW = R ecord D escriptor W ord: Data preceding a variable record that specifies the length of the entire record including the RDW.
Variable-length records are processed with a record descriptor word (RDW) in positions 1-4, so the data starts in position 5. Fixed-length records are processed without an RDW, so the data starts in position 1. Control statement positions should be specified accordingly.
Back to top
Mahua Mitra New User Joined: 26 Apr 2007Posts: 49 Location: Delhi
I have changed the sort card to:
Code:
SORT FIELDS=COPY
INCLUDE COND=(7,04,CH,EQ,C'KE64',AND,8,3,CH,EQ,C'ADD')
OUTREC FIELDS=(01:01,04,
09:257,04,PD,EDIT=(TTTTTTT-),
17:264,08,PD,EDIT=(TTTTTTTTTTTTTTT-),
33:285,07,PD,EDIT=(TTTTTTTTTTTTT-))
but the output file is coming empty
Back to top
murmohk1 Senior Member Joined: 29 Jun 2006Posts: 1436 Location: Bangalore,India
Mahua,
Quote:
7,04,CH,EQ,C'KE64',AND,8,3,CH,EQ,C'ADD'
Check your INCLUDE condition. 8,3,CH,EQ,C'ADD' is making the difference.
Back to top
Anuj Dhawan Superior Member Joined: 22 Apr 2006Posts: 6250 Location: Mumbai, India
Mahua,
For better suggestions, please show the input & the expected output.
Back to top
murmohk1 Senior Member Joined: 29 Jun 2006Posts: 1436 Location: Bangalore,India
Mahua,
Your condition is something like this -
Value from 7 to 11 cols - KE64
Value from 8 to 11 cols - ADD
If both the above conds satisfy, record will be written to OP file. As you can see you will not get any record which satisfy the above conditiosn.
Back to top
Please enable JavaScript!