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. Full Time COBOL Software Development ... shally Mainframe Jobs 0 Fri Jan 20, 2017 5:24 am
This topic is locked: you cannot edit posts or make replies. COBOL Software Development Lead at Fi... shally Mainframe Jobs 0 Fri Jan 20, 2017 5:21 am
No new posts Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
No new posts OO COBOL compile error Virendra Shambharkar COBOL Programming 3 Tue Jan 10, 2017 6:05 pm
No new posts Need Suggestion on COBOL program vickey_dw COBOL Programming 5 Thu Jan 05, 2017 10:55 pm


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