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

Manual for understanding the USAGE Clauses


IBM Mainframe Forums -> Suggestions & Feedback
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
prabhucs01
Warnings : 1

New User


Joined: 07 Mar 2005
Posts: 43

PostPosted: Fri Apr 15, 2005 5:29 pm
Reply with quote

can any body send or suggest a good manual for understanding the

usage clause concepts(comp,comp1,comp3)..
Back to top
View user's profile Send private message
parul

New User


Joined: 08 Apr 2005
Posts: 11
Location: mumbai

PostPosted: Sat Apr 16, 2005 12:47 pm
Reply with quote

Hi
COMP is binary data. COMP items are native binary items (rough equivalent to an int in C). Arithmetic with this kind of data is normally very fast. Use COMP for subscripts and line counters. Use COMP for items that are calculated frequently and moved to DISPLAY-NUMERIC items infrequently (because to move a COMP item to a display numeric one, COBOL generally converts it to packed then to display). For binary data, the field will be 2 bytes long if the picture is S9(01) - S9(04). It will be 4 bytes long if S9(05) - S9(09). And 8 bytes long if S9(10) - S9(18) COMP-1 and COMP-2 are floating point. COMP-3 is packed. COMP-3 is a good choice for running totals, sub-totals and similar data items. Arithmetic is reasonably fast and conversion to display is fairly fast as well. Like COMP items, these should not be in external files that may need to be shared on another platform. COMP-3 fields should always be signed and have an odd number of digits for best performance. (e.g. S9(3) COMP-3 requires 2 bytes; 3 nibbles for the digits and one for the sign. S9(4) requires 3 bytes; 4 nibbles for the digits, one for the sign, and one extra that the compiler must clear whenever the field is changed) SYNC is an abbreviation for SYNCHRONIZED. It is used with binary data to align it on a proper address.

Use of SYNC gives faster access at the cost of storage.

Parul..
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 -> Suggestions & Feedback

 


Similar Topics
Topic Forum Replies
No new posts STEM usage in REXX CLIST & REXX 14
No new posts z/OS Modules Usage report using SMF 42 DFSORT/ICETOOL 2
No new posts Concatenate 2 fields (usage national)... COBOL Programming 2
No new posts JCL and TAPE drives: how to maximize ... JCL & VSAM 9
No new posts Usage of BINSEARCH PL/I PL/I & Assembler 1
Search our Forums:

Back to Top