You are here:

Cobol/Moving Pic S9(2)v9 to Pic X(?)

Advertisement


Question
Hi

Is is possible to move Pic S9(2)v9 to Pic X(?) field? If so, what would Pic X be defined as  ..Pic X (4) or (5)?? I want to make sure the sign and the decimal point are being passed through.

Thank You

Paul

Answer
Exactly what the results are depends on the version of COBOL and platform you are running on.
The decimal point is LOGICAL, and will not show in a move you have set. Also. most versions will not convert the sign to a character. If you need both you need to create an edited result field, not a PIC X of any size.

David.  

Cobol

All Answers


Answers by Expert:


Ask Experts

Volunteer


David Nelson

Expertise

I specialize in IBM z/OS COBOL and MicroFocus OCDS and Server Express non-OOP. Design, coding and performance oriented questions. Also linking to IBM Assembler from COBOL. Because the rules change with version, please state language level, version and platform environment. See CICS for questions about CICS.

Experience

Over 35 years working with COBOL on multiple platforms and OS.

Education/Credentials
Graduate, New York School of Computer Technology.

Past/Present Clients
Major Financial Institutions, State of NC (DHHS), Manufacturing, Financial services, Warehousing, Software developer and others.

©2016 About.com. All rights reserved.