Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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: 2502
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: 7315

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 StreamWeaver language reference chetanambi Compuware & Other Tools 1 Wed Jul 05, 2017 12:50 pm
No new posts READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts Alter &DATENS field in HEADER1 Angad DFSORT/ICETOOL 4 Mon Apr 24, 2017 11:49 am
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us