Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Creating a 'packed' decimal for IBM mainframe upload
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00139013
Message ID:
00139136
Vues:
28
Hi Rick,

>I was intrigued by Gerry's routine that Christof posted, and sure enough it works, generating the correct packed decimal strings.

I'm glad it worked. I'd never had to deal with these numbers, so I could only post this code, not verify it or even take in account all those variations that might exist.

>BTW, did you know that VFP5 comes with a hex editor that you can use to see this kind of stuff in a file? Look for HEXEDIT.APP in VFP5\TOOLS\HEXEDIT.

Yep, I use it quite often to analyze the format of files, and so. BTW, since I often have to deal with binary memos and structures returned by API functions, here's a small tool I wrote to display a hex dump of memory variables:
   LParameter tcString

   Local lnPos, lnChar, lnCol, lnRow
   lnCol = 0
   lnRow = 0
   For lnPos = 1 To Len(tcString)
      If lnCol%16 = 0
         ? Transform(lnRow,"@0")+" : "
         lnRow = lnRow+16
      Endif
      lnCol = lnCol + 1
      lnChar = Asc(SubStr(tcString,lnPos,1))
      ?? Right(Transform(lnChar,"@0"),2)+" "
   Endfor
Christof
--
Christof
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform