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
 

 

SMF type define as "floating", how COBOL to handle

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
Gary Lin
Warnings : 1

New User


Joined: 08 Mar 2009
Posts: 15
Location: Taipei, Taiwan

PostPosted: Sun Apr 12, 2009 4:35 am    Post subject: SMF type define as "floating", how COBOL to handle
Reply with quote

SMF type 71, the SMF71ASI is the Number of page-ins from auxiliary storage for shared page group, it is defined as length 8, and format is “floating”. How to define this filed with COBOL pic, is X or 9, and the length. How to use MOVE to get this number to print?
Back to top
View user's profile Send private message

CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Sun Apr 12, 2009 4:44 am    Post subject:
Reply with quote

Have you looked at the manual?
COMPUTATIONAL-1
or COMP-1 (floating-point) Specified for internal floating-point items (single precision). COMP-1 items are 4 bytes long.
COMPUTATIONAL-2
or COMP-2 (long floating-point) Specified for internal floating-point items (double precision). COMP-2 items are 8 bytes long.
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: Sun Apr 12, 2009 4:53 am    Post subject: Reply to: SMF type define as "floating", how COBOL
Reply with quote

Gary,

As much as this may seen strange, an eight byte floating item/field in COBOL is defined as COMP-2 with no picture clause and (FWIW) a four byte floating point item/field is defined as COMP-1, with no picture clause.

Code:

03  WS-FLOAT-LONG COMP-2.
03  WS-FLOAT-SHORT COMP-1.


COBOL will convert this to a displayable value successfully, nearly all of the time (hence, the caveat).

Please review the appropriate COBOL Programming Guide for notes regarding conversion results and possible loss of significance.

Regards,
Back to top
View user's profile Send private message
Gary Lin
Warnings : 1

New User


Joined: 08 Mar 2009
Posts: 15
Location: Taipei, Taiwan

PostPosted: Sun Apr 12, 2009 4:56 am    Post subject: Reply to: SMF type define as "floating", how COBOL
Reply with quote

I do read the manual, please draw up the satement, for cobol defines as PIC x(??) or pic 9(??) , indicate the ?? length number in working storage , and how to use MOVE to get this number in procedure?
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Sun Apr 12, 2009 5:11 am    Post subject:
Reply with quote

Quote:
and how to use MOVE to get this number in procedure?
Heck, a MOVE is a move, just move the dang thing from what it is to what you want it to be....
Back to top
View user's profile Send private message
Gary Lin
Warnings : 1

New User


Joined: 08 Mar 2009
Posts: 15
Location: Taipei, Taiwan

PostPosted: Sun Apr 12, 2009 6:23 am    Post subject:
Reply with quote

highly appreciate your help, it works as expectations.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sun Apr 12, 2009 7:45 am    Post subject: Reply to: SMF type define as "floating", how COBOL
Reply with quote

Good to hear it is working - thanks for letting us know icon_smile.gif

d
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Cobol GUI (like Editor) Kala Mainframe COBOL Programming 14 Wed May 10, 2017 12:30 pm
No new posts IMS T-Pipe queue counts in a COBOL Pr... Siva NKK Kothamasu IMS DB/DC 0 Tue May 09, 2017 6:31 pm
No new posts READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am
No new posts Cobol upgrade - source code missing f... gthmrj IBM Tools 1 Wed Apr 26, 2017 6:04 pm


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