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 interview questions Deepak1518780 Mainframe Interview Questions 5 Sat Sep 22, 2018 7:26 pm
No new posts Replace comp-3 field value to comp-3 ... dharmaraok DFSORT/ICETOOL 5 Fri Sep 14, 2018 3:46 pm
No new posts Extra data in overlay field speermb DFSORT/ICETOOL 2 Thu Sep 13, 2018 6:04 pm
No new posts RPG II Problem with unsigned Packed d... Andi1982 All Other Mainframe Topics 6 Tue Sep 11, 2018 6:11 pm
No new posts How can we create a flat file in JAVA... jasorn Java & MQSeries 2 Wed Aug 08, 2018 3:08 pm

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