IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Logical Thinking


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
subramanianup
Warnings : 1

New User


Joined: 18 May 2005
Posts: 46
Location: Bangalore, INDIA

PostPosted: Thu Feb 02, 2006 1:02 pm
Reply with quote

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
View user's profile Send private message
Vidusha

New User


Joined: 01 Feb 2006
Posts: 20
Location: Chennai

PostPosted: Thu Feb 02, 2006 2:26 pm
Reply with quote

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
View user's profile Send private message
Vidusha

New User


Joined: 01 Feb 2006
Posts: 20
Location: Chennai

PostPosted: Thu Feb 02, 2006 2:39 pm
Reply with quote

Sorry..The First parameter, position change for VB. it is +4.
So SORT FIELDS=(11,10,pd).

Thanks
Vidhya
Back to top
View user's profile Send private message
subramanianup
Warnings : 1

New User


Joined: 18 May 2005
Posts: 46
Location: Bangalore, INDIA

PostPosted: Wed Feb 08, 2006 3:47 pm
Reply with quote

SORT FIELDS=(11,6,pd).

For COMP-3 filed we have to give length only not total chars
Back to top
View user's profile Send private message
fixdoubts

New User


Joined: 21 Oct 2005
Posts: 54

PostPosted: Wed Feb 08, 2006 4:02 pm
Reply with quote

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
View user's profile Send private message
prabs2006

Active User


Joined: 12 Jan 2006
Posts: 103

PostPosted: Thu Feb 09, 2006 5:44 pm
Reply with quote

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
View user's profile Send private message
subramanianup
Warnings : 1

New User


Joined: 18 May 2005
Posts: 46
Location: Bangalore, INDIA

PostPosted: Thu Feb 09, 2006 5:54 pm
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Thu Feb 09, 2006 10:10 pm
Reply with quote

9(10) comp-3 and S9(10) comp-3 are both equivalent to 6-byte PD fields as far as DFSORT is concerned. Internally, the value looks like this: X'0dddddddddds'. With 9(10), s will always be positive. With S9(10), s can be positive or negative.

For a table showing the relationship of COBOL data types to DFSORT formats, see:

www.ibm.com/servers/storage/support/software/sort/mvs/professor_sort/srtmacfm.html
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Rotate partition-logical & physic... DB2 0
No new posts how to show listing in physical locat... PL/I & Assembler 2
No new posts FileAid to compare(logical operations... Compuware & Other Tools 3
No new posts Logical Processors All Other Mainframe Topics 4
No new posts DD name access using multiple logical... COBOL Programming 1
Search our Forums:

Back to Top