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

when to use COMP SYNC


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
mf_user
Currently Banned

New User


Joined: 05 Jan 2006
Posts: 47

PostPosted: Sat Jan 14, 2006 4:13 pm
Reply with quote

Hi,

When to use COMP SYNC on a variable? Can it be used on group item also?

Thanks. icon_exclaim.gif
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sat Jan 14, 2006 11:31 pm
Reply with quote

Hi mf,

You get better performance when it's used for comp (but not comp-3) items used in arith operations.

To get an idea of how much you might gain per instr execution comple your pgm w/the LIST,NOOFF compiler opts. Code a test by uning SYNC for a comp item and don't use it for another. Create the same arith stmt for each, then check the compile listing and compare the generated assembler instructions.

You can use it for group items, but remember 01 items are SYNCed automatically. Not sure if 77s are.
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Sun Jan 15, 2006 11:06 am
Reply with quote

And you can find it all in the fine manual.

O.
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 -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts COBOL - Move S9(11)v9(7) COMP-3 to -(... COBOL Programming 5
No new posts Converting ASCII values to COMP-3 (ZD... JCL & VSAM 2
No new posts Interviewers are surprised with my an... Mainframe Interview Questions 6
No new posts Cobol COMP-2 fields getting scrambled... Java & MQSeries 6
No new posts convert alphanumeric PIC X(02) to hex... COBOL Programming 3
Search our Forums:

Back to Top