01 a pic s9(5) value -12345,
if we disply a , the sign will overpunched with last digit
but i need to get the miuns sign in the result?
Answer Posted / mr.perfect
01 A pic s9(5) value -12345
01 B pic +9(5)
PROCEDURE DIVISION
MOVE A TO B
DISPLAY B
STOP RUN
o/P:
-12345
Will this work?
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Explain sorting techniques in cobol program? Provide the sort file definition, the sort statement, its syntax and meaning
What is amode(24), amode(31), rmode(24) and rmode(any) (applicable to only mvsesa enterprise server) ?
Program A (Normal COBBAT) calling a B Program (DB2COBOL, COBBATDB which is using a VSAM file. its a dynamic call. How we will handle VSAM file decleration in our from JCL from where we are running A PGM. And should we have PLAN for A pGM also. if possible can some one post a sample JCL. Thanks for help in advance.
How to use the same COBOL program in Batch and CICS on lines? explain with an example
how do you reference the fixed unblock file formats from cobol programs
input= ,,,, mainframe training ,,, hyderabad .... location.... output1=$ mainframe training in hyderabad location$ output2=**** mainframe training in hyderabad location ****. In this pgn when we give input considering the spaces the output is displayed in this format.Like in the place of ,,,, $ should be displayed likewise.So please helpmeout.
What is the difference between external and global variables in COBOL?
I have a program with an Array of 5000 occurences which is being passed from 5 sub levels to the front end screen. Thess 5 programs using each 5*2 = 10 different arrays with size as 5000. This is causing the transaction to utilize more storage consupmtion. I am looking to reduce the storage consumption. As part of that initially i thought Dynamic array may solve my problem. After viewing the comments given i see its same as normal array. IS there any other way we can resolve this issue?
What happens when we move a comp-3 field to an edited (say z (9). Zz-)?
How to know whether the module is dynamical or statistical?
What type of SDLC u followed? Why?
What is the difference between Global and External Variables?
if we have " ibm mainframe ",in that how to remove first and last leading space eg:"ibm mainframe" like that the answer we need
Discuss about changing dataset name in proc.
When is inspect verb is used in cobol?