View previous topic :: View next topic
|
Author |
Message |
subramanianup Warnings : 1 New User
Joined: 18 May 2005 Posts: 46 Location: Bangalore, INDIA
|
|
|
|
You have VB file as input, there is Account Number field with picture clause 9(10) comp 3 starting at 7th position in input file. how do you write a sort card using Account No as the Control Field? |
|
Back to top |
|
|
Vidusha
New User
Joined: 01 Feb 2006 Posts: 20 Location: Chennai
|
|
|
|
I think SORT FIELDS=(7,10,PD) will work. Is there any difference in sorting for FB and VB Record format?
Thanks
Vidhya |
|
Back to top |
|
|
Vidusha
New User
Joined: 01 Feb 2006 Posts: 20 Location: Chennai
|
|
|
|
Sorry..The First parameter, position change for VB. it is +4.
So SORT FIELDS=(11,10,pd).
Thanks
Vidhya |
|
Back to top |
|
|
subramanianup Warnings : 1 New User
Joined: 18 May 2005 Posts: 46 Location: Bangalore, INDIA
|
|
|
|
SORT FIELDS=(11,6,pd).
For COMP-3 filed we have to give length only not total chars |
|
Back to top |
|
|
fixdoubts
New User
Joined: 21 Oct 2005 Posts: 54
|
|
|
|
Hi,
Subramanianup is right.
Since yours is a VB file first four bytes will contain control info your
record starts at fifth position only and your are using a
COMP-3 field which i half byte in length plus the sign byte will make
the 9(01) comp 3 to be of 6 bytes in length
SO the sort card will be
SORT FIELDS=(11,6,PD).
Correct me if am wrong.
Regards, |
|
Back to top |
|
|
prabs2006
Active User
Joined: 12 Jan 2006 Posts: 103
|
|
|
|
Hi,
But there is no sign bit explicitly mentioned. The Q says picture clause 9(10) comp 3. So shouldn't it be a SORT FIELDS=(11,5,PD) ?
Thanks & regards
Prabs |
|
Back to top |
|
|
subramanianup Warnings : 1 New User
Joined: 18 May 2005 Posts: 46 Location: Bangalore, INDIA
|
|
|
|
hi,
for length calculation always (n/2) +1, so if you are not mention it will take 6 bytes only
so it will be SORT FIELDS=(11,6,PD) |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
Back to top |
|
|
|