Portal | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum 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

Moderator Emeritus


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

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 How do i verify the char field is hav... Raghu M N PL/I & Assembler 1 Tue Sep 22, 2020 9:26 pm
No new posts RPLDDDD field for extended VSAM - ESDS amitsjcntl JCL & VSAM 0 Tue Sep 22, 2020 1:45 pm
No new posts Write 9(07) comp-3 data into output file clearskynot DFSORT/ICETOOL 4 Thu Apr 16, 2020 11:00 pm
No new posts Usage of processor directive and firs... Sakthidevi PL/I & Assembler 4 Fri Apr 10, 2020 6:27 pm
No new posts To extract the records after the firs... saikarthik94 JCL & VSAM 5 Thu Feb 20, 2020 7:00 pm

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