Show Decimal Point in Output

Ask/Clarify the questions on EASYTRIEVE

Moderators: DikDude, Moderator Group

Post Reply
sahiljethi
Member
Posts: 10
Joined: Thu Nov 24, 2011 9:40 pm

Show Decimal Point in Output

Post by sahiljethi » Fri Dec 09, 2011 6:11 pm

Hi,

Please NOTE the CODE BELOW:

Code: Select all

FILE OUTAUDIT FB(11 110)
OUT-AMT                 1  11  N 2
*--------------------WORKING STORAGE VARIABLES------------
  WS-AMT                  W   11   N 2                    
*----------------------JOB STATEMENT-----------------------------
 JOB INPUT INAUDIT                   
         DISPLAY 'WS-AMT: ' WS-AMT 
         OUT-AMT = WS-AMT          
 GOTO JOB
WS-AMT contains amount 50.00
Same amount is even getting displayed successfully in SYSOUT.

Code: Select all

WS-AMT:          50.00 
But the amount being written to file is:

Code: Select all

00000005000
I want the amount written to file should contain decimal S9(7).99.

Please help me with the same.

Thanks,
Sahil[/code]

DikDude
Moderator
Posts: 1001
Joined: Fri Jul 22, 2011 8:39 am
Location: usa

Post by DikDude » Sat Dec 10, 2011 12:24 pm

You need to define an edited output field that contains zero suppression and punctuation (the decimal point).
Have a good one

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others