Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to declare 9(4) comp-5 field in assembly language

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
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    Post subject: How to declare 9(4) comp-5 field in assembly language
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: 2504
Location: Atlanta, Georgia, USA

PostPosted: Fri Jul 19, 2013 3:24 pm    Post subject: Reply to: How to declare 9(4) comp-5 field in assembly langu
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    Post subject: Reply to: How to declare 9(4) comp-5 field in assembly langu
Reply with quote

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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7314

PostPosted: Sun Jul 21, 2013 1:04 pm    Post subject: Reply to: How to declare 9(4) comp-5 field in assembly langu
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    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts COMP Variables Mismatch gayu7 COBOL Programming 5 Wed Dec 20, 2017 5:06 pm
No new posts Moving a COMP-3 Variable to a Numeric... ajayachander COBOL Programming 2 Thu Dec 14, 2017 5:46 pm
No new posts CONDITIONAL USING COMP-2 WITH PROBLEMS. JOSUEGENTIL COBOL Programming 7 Wed Nov 08, 2017 11:13 pm
No new posts how can i move s9(9) to s9(9) usage comp HARENDRA CHOUDHARY COBOL Programming 3 Mon Nov 06, 2017 12:10 am
This topic is locked: you cannot edit posts or make replies. Incrementing current time field by 30... arunsoods DFSORT/ICETOOL 11 Thu Oct 26, 2017 3:22 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us