× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: Re[2]: Converting from packed to character in Query/400
  • From: Carol.Collins@xxxxxxxxxxx (Carol Collins)
  • Date: Tue, 19 Aug 1997 09:59:21 -0600


 
 John Dorn wrote,
 
 >I believe you are mistaken about ILE C handling packed decimal.  You 
 >can declare (and use) packed decimal variables after including 
 >decimal.h.  Check out the ILE C/400 Programmer's Reference index >for 
 the few (very) references to using packed decimals.
 
 Thanks, John.  I think I may be confused. I should have used the term 
 "zoned decimal", rather than "packed decimal", but I'm not sure what the 
 differences are.  I expect it is how the sign is stored. In the numbers in 
 my file, the sign is stored in the low order digit.  When the sign is 
 negative, the low order digit is stored as, e.g. 'J' instead of '1'. (I 
 think this was once referred to as "sign overpunch", but let's not get into 
 that History thing, again!) 
 
 What led me to believe that C would not handle this, is that I included 
 the file DDS in my C program, and found that the zoned decimal fields were 
 converted to character.  The following text is from the compiler listing:
 
 |#include "qryo"                                                         
 |/* --------------------------------------------------------------------- 
 |/* PHYSICAL FILE: C40020/QQRYOUT                                        
 |/* FILE CREATION DATE: 97/08/18                                         
 |/* RECORD FORMAT: QQRYOUT                                               
 |/* FORMAT LEVEL IDENTIFIER: 4FA4FA78BB18D                               
 |/* --------------------------------------------------------------------- 
 |typedef _Packed struct {                                                
 |   char WBS[13];                                                        
 |   char WBSDESC[30];                                                    
 |   char WBSLEV[2];                      /*  ZONED SPECIFIED IN DDS      
 |                                        /*  REPLACED BY CHARACTER TYPE  
 
 _________________________________________________________________________
 
 
  -- Carol 
 
 +=======================================================================+ 
 |    Carol Collins   Sr. Network Administrator                          | 
 |                    WASTREN  /  Holmes and Narver Services, Inc.       | 
 |                    2597 B-3/4 Road                                    | 
 |                    Grand Junction, CO  81503                          | 
 |                    U.S. Dept of Energy  Grand Junction Office         | 
 |    Internet:       Carol.Collins@doegjpo.com                          | 
 |    Phone   :       (970) 248-6524                                     | 
 +=======================================================================+
 
 
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This is the Midrange System Mailing List!  To submit a new message,   *
* send your mail to "MIDRANGE-L@midrange.com".  To unsubscribe from     *
* this list send email to MAJORDOMO@midrange.com and specify            *
* 'unsubscribe MIDRANGE-L' in the body of your message.  Questions      *
* should be directed to the list owner / operator: david@midrange.com   *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.