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

How to declare 9(4) comp-5 field in assembly language


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Pavankumar.m
Warnings : 1

New User


Joined: 28 Nov 2010
Posts: 53
Location: Mumbai

PostPosted: Fri Jul 19, 2013 3:16 pm
Reply with quote

Hi ,

Can any one please tell me how to declare comp-5 field in assembly language.

Ex :below cobol field i want to declare it in assembly language.

cobol:-
10 ABC PIC 9(4) COMP-5.

Assembly:- ?

Thanks and Regards,
pavan Kumar.M
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Fri Jul 19, 2013 3:24 pm
Reply with quote

If it's aligned - PIC 9(04) COMP-5 SYNC -
Code:

ALIGND    DS   H

If it's unaligned - PIC 9(04) COMP-5 -
Code:

UNALIGND  DS   XL2

O R -
Code:

UNALIGND  DS   AL2

In your example, choose unaligned (either one).
Back to top
View user's profile Send private message
Pavankumar.m
Warnings : 1

New User


Joined: 28 Nov 2010
Posts: 53
Location: Mumbai

PostPosted: Sat Jul 20, 2013 2:22 pm
Reply with quote

Thank you so much bill :-)
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Sun Jul 21, 2013 1:04 pm
Reply with quote

In COBOL, all fields which are defined as "binary" are defined identically in storage.

That is,usage COMP-5 is defined in exactly the same way as BINARY/COMP/COMP-5.

What is different in COBOL about those fields is the code that is generated to use them.

Assembler doesn't generate code for you.

If you want a field in Assembler to behave as if it were a COMP-5 in COBOL, then you're going to have to produce equivalent code, not equivalent definitions.
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 -> PL/I & Assembler

 


Similar Topics
Topic Forum Replies
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts COBOL - Move S9(11)v9(7) COMP-3 to -(... COBOL Programming 5
No new posts Join 2 files according to one key field. JCL & VSAM 3
No new posts How to move the first field of each r... DFSORT/ICETOOL 5
No new posts S0C7 - Field getting overlayed COBOL Programming 2
Search our Forums:

Back to Top