| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| is there a function in cobol that i can get my HDD number, or chip number or some other unique single user identification ? tks a lot! |
|
#2
| |||
| |||
| On Aug 5, 4:25*am, mario <mmc_vw1...@hotmail.com> wrote: > is there a function in cobol that i can get my HDD number, or chip > number or some other unique single user identification ? > > tks a lot! Hi, There are no COBOL functions that can get a unique system ID. But, if you are willing and able to use the Windows Management Instrumentation classes, then.... You can use the same installation ID of the operating system to get a globally unique ID for a given machine. The following WMI class should help you out: Win32_WindowsProductActivation Or, you can use the following WMI class to get the manufacturer's serial number used to identify the physical media: Win32_PhysicalMedia http://msdn2.microsoft.com/En-US/library/aa394520.aspx http://msdn2.microsoft.com/en-us/library/Aa394346.aspx Kellie. |
|
#3
| |||
| |||
| On Tue, 5 Aug 2008 04:25:33 -0700 (PDT), mario <mmc_vw1200@hotmail.com> wrote: >is there a function in cobol that i can get my HDD number, or chip >number or some other unique single user identification ? > >tks a lot! Short answer- no. Regards, //// (o o) -oOO--(_)--OOo- "Bigamy is having one wife too many. Monogamy is the same." --- Oscar Wilde ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Remove nospam to email me. Steve |
|
#4
| |||
| |||
| "mario" <mmc_vw1200@hotmail.com> wrote in message news:a031ca82-2711-4044-b02b-9e0cbb32a31e@a70g2000hsh.googlegroups.com... > is there a function in cobol that i can get my HDD number, or chip > number or some other unique single user identification ? > > tks a lot! Presuming you're going through WINDOWS, would retrieving the value of USERNAME from the environment suit your purpose, or could you arrange for a unique environment variable to retrieve? |
|
#5
| |||
| |||
| On Aug 5, 11:25*pm, mario <mmc_vw1...@hotmail.com> wrote: > is there a function in cobol that i can get my HDD number, or chip > number or some other unique single user identification ? The MAC address on your NIC should be globally unique. On Linux /sbin/ ifconfig will list the network cards with the hardware address. On Windows it may be ipconfig and this should give the 6 byte physical address. You should be able to use something like: CALL "SYSTEM" USING "ipconfig >networkdata" & x"00" and then read the resulting file to extract the required item. Warning: just because that number is burned onto the network card does not mean that if/ip config actually gets it from there. There is a driver between the utility and the card and anything can happen between, and often does. |
|
#6
| |||
| |||
| On Aug 6, 3:33*am, Kellie Fitton <KELLIEFIT...@yahoo.com> wrote: > On Aug 5, 4:25*am, mario <mmc_vw1...@hotmail.com> wrote: > > > is there a function in cobol that i can get my HDD number, or chip > > number or some other unique single user identification ? > > > tks a lot! > > Hi, > > There are no COBOL functions that can get a unique system ID. > But, if you are willing and able to use the Windows Management > Instrumentation classes, then.... > > You can use the same installation ID of the operating system > to get a globally unique ID for a given machine. *The following > WMI class should help you out: > > * * * * Win32_WindowsProductActivation I suspect that this need not be 'globally unique'. For example in corporates where machines are cloned with a corporate license will they not be all the same ? > Or, you can use the following WMI class to get the manufacturer's > serial number used to identify the physical media: > > * * * * Win32_PhysicalMedia What happens when the OS is running on virtualised hardware ? > http://msdn2.microsoft.com/En-US/library/aa394520.aspx > > http://msdn2.microsoft.com/en-us/library/Aa394346.aspx Your suggestion is also a Windowsie thing and this may not be mario's environment. |
|
#7
| |||
| |||
| On Aug 5, 9:08*pm, Richard <rip...@azonic.co.nz> wrote: > > I suspect that this need not be 'globally unique'. For example in > corporates where machines are cloned with a corporate license will > they not be all the same ? > > What happens when the OS is running on virtualised hardware ? > Hi Richard, There are no truly unique machine identifiers, PC and PC compatible computers do not have unique IDs. The serial number of an ATA hard disc unit uniquely identifies that ATA hard disc. The serial number of an Intel CPU uniquely identifies that CPU. The "machine SID" created by Windows NT uniquely identifies that installation of Windows NT. In a network environment, the MAC address is unique on a given network segment, but duplications certainly can exist on different segments. Moreover, changing the MAC address is not so difficult, maybe Mario should look into the commercial packages for software licensing. Kellie. |
|
#8
| |||
| |||
| On Aug 7, 3:42*am, Kellie Fitton <KELLIEFIT...@yahoo.com> wrote: > On Aug 5, 9:08*pm, Richard <rip...@azonic.co.nz> wrote: > > > > > I suspect that this need not be 'globally unique'. For example in > > corporates where machines are cloned with a corporate license will > > they not be all the same ? > > > What happens when the OS is running on virtualised hardware ? > > Hi Richard, > > There are no truly unique machine identifiers, *PC and PC > compatible computers do not have unique IDs. *The serial > number of an ATA hard disc unit uniquely identifies that ATA > hard disc. Only if the manufacturer has actually put a unique number in the ROM of the drive. Many put a generic number by batch. >*The serial number of an Intel CPU uniquely identifies > that CPU. *The "machine SID" created by Windows NT uniquely > identifies that installation of Windows NT. The question I asked was whether, in fact, it is unique when corporates clone machines. > In a network environment, the MAC address is unique on a given > network segment, *but duplications certainly can exist on different > segments. The MAC address on a NIC is allocated to manufacturers by the IEEE and is unique to every ethernet or WiFi card. It is burned on the card but may, of course, be spoofed. It has nothing to do with segments which is based on IP address which is quite different. >*Moreover, changing the MAC address is not so difficult, Nor any of the others. > maybe Mario should look into the commercial packages for software > licensing. |
|
#9
| |||
| |||
| is there a way to get the mac-address via cobol?? |
|
#10
| |||
| |||
| "mario" <mmc_vw1200@hotmail.com> wrote in message news:de61a063-3f15-40f5-b505-d6fb968fe8c7@k13g2000hse.googlegroups.com... > is there a way to get the mac-address via cobol?? Yes. Richard posted it to this thread 3 days ago. You can shell and run "ipconfig" (redirecting the output to a simple text file then reading the text file.) or you might consider running "ipconfig" directly through the windows API. You never said whether you are running Windows or not, and you never stated which version of COBOL you are running. These things have a bearing on the solution. Pete. -- "I used to write COBOL...now I can do anything." |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.