Conversion to octal
Bruin, J.M. de
Bruin@WT.TNO.NL
Wed, 29 Oct 2003 21:55:25 +0100
FOr a maximum of 134217727 (decimal i.e. 77777777 octal) you could use this:
Temp t'zu10NUMBER Zoned Unsigned Size 10
Temp t'n1OCTAL8 Numeric*1
Temp t'n1OCTAL8 Numeric*1
Temp t'n1OCTAL8 Numeric*1
Temp t'n1OCTAL8 Numeric*1
Temp t'n1OCTAL8 Numeric*1
Temp t'n1OCTAL8 Numeric*1
Temp t'n1OCTAL8 Numeric*1Temp t'zu10OCTAL7 Zoned Unsigned Size 10
Temp t'zu10OCTAL6 Zoned Unsigned Size 10
Temp t'zu10OCTAL5 Zoned Unsigned Size 10
Temp t'zu10OCTAL4 Zoned Unsigned Size 10
Temp t'zu10OCTAL3 Zoned Unsigned Size 10
Temp t'zu10OCTAL2 Zoned Unsigned Size 10
Temp t'zu10OCTAL1 Zoned Unsigned Size 10
Temp t'zu10OCTAL0 Zoned Unsigned Size 10
Temp t'zu10NUMBER8 Zoned Unsigned Size 10
Temp t'zu10NUMBER7 Zoned Unsigned Size 10
Temp t'zu10NUMBER6 Zoned Unsigned Size 10
Temp t'zu10NUMBER5 Zoned Unsigned Size 10
Temp t'zu10NUMBER4 Zoned Unsigned Size 10
Temp t'zu10NUMBER3 Zoned Unsigned Size 10
Temp t'zu10NUMBER2 Zoned Unsigned Size 10
Temp t'zu10NUMBER1 Zoned Unsigned Size 10
Temp t'zu10NUMBER0 Zoned Unsigned Size 10
Item t'zu10NUMBER = 134217727 (the max value as an example)
Item t'zu10OCTAL8 = Floor(t'zu10NUMBER / (8^8))
Item t'zu10NUMBER8 = t'zu10NUMBER - t'zu10OCTAL8 * (8^8)
Item t'zu10OCTAL7 = Floor(t'zu10NUMBER8 / (8^7))
Item t'zu10NUMBER7 = t'zu10NUMBER8 - t'zu10OCTAL7 * (8^7)
Item t'zu10OCTAL6 = Floor(t'zu10NUMBER7 / (8^6))
Item t'zu10NUMBER6 = t'zu10NUMBER7 - t'zu10OCTAL7 * (8^6)
Item t'zu10OCTAL5 = Floor(t'zu10NUMBER6 / (8^5))
Item t'zu10NUMBER5 = t'zu10NUMBER6 - t'zu10OCTAL7 * (8^5)
Item t'zu10OCTAL4 = Floor(t'zu10NUMBER5 / (8^4))
Item t'zu10NUMBER4 = t'zu10NUMBER5 - t'zu10OCTAL7 * (8^4)
Item t'zu10OCTAL3 = Floor(t'zu10NUMBER4 / (8^3))
Item t'zu10NUMBER3 = t'zu10NUMBER4 - t'zu10OCTAL7 * (8^3)
Item t'zu10OCTAL2 = Floor(t'zu10NUMBER3 / (8^2))
Item t'zu10NUMBER2 = t'zu10NUMBER3 - t'zu10OCTAL7 * (8^2)
Item t'zu10OCTAL1 = Floor(t'zu10NUMBER2 / (8^1))
Item t'zu10NUMBER1 = t'zu10NUMBER2 - t'zu10OCTAL7 * (8^1)
Item t'zu10OCTAL0 = Floor(t'zu10NUMBER1 / (8^0))
Item t'zu10NUMBER0 = t'zu10NUMBER1 - t'zu10OCTAL7 * (8^0)
> -----Original Message-----
> From: Mike Palandri [mailto:palandri@4j.lane.edu]
> Sent: Wednesday, October 29, 2003 19:12
> To: powerh-l@lists.swau.edu
> Subject: Re: Conversion to octal
>
>
> It's all in QTP. It's not really account creation per se,
> but a master
> file that stores VMS user names and UICs for student email
> accounts, thus
> the need to create the UIC numbers. All students that have a
> record in the
> file; a subset actually get or have accounts.
>
> When a teacher authorizes a student for email, they use a web based
> interface that pulls the student data from the file and
> creates the account
> via DCL.
>
>
> At 05:06 PM 10/29/2003 +0000, Chris Sharman wrote:
> >Mike Palandri wrote:
> >>Hi all,
> >>Anyone have a ready made piece of qtp code to convert a
> positive (base
> >>10) integer to octal?
> >
> >Presumably you're writing dcl to do this (account creation) ?
> >(I wouldn't mess with sysuaf any other way)
> >
> >How about: 'f$fao("!%I",<number>)'
> >
> >Chris
> >
> >
> >
> >-------------------------------------------------------------
> ----------
> >
> >Any views expressed in this message are those of the sender and not
> >necessarily those of CCA Group. The unauthorized use, disclosure,
> >copying or alteration of this message is forbidden. The contents of
> >this message may be confidential and/or privileged,
> copyright CCA Group
> >and are intended solely for the use of the individual or
> entity to whom
> >they are addressed. Whilst this message has been scanned, CCA Group
> >cannot guarantee that it is virus free or compatible with
> your systems
> >and accepts no responsibility for any loss or damage arising from its
> >use. The recipient is advised to run their own anti-virus
> software. If
> >you receive this message in error please contact
> >postmaster@ccagroup.co.uk immediately, destroy any copies
> and delete it
> >from your computer systems.
> >= = = = = = = = = = = = = = = = = = = = = = = = = = = =
> >Mailing list: powerh-l@lists.swau.edu
> >Subscribe: "subscribe" in message body to
> powerh-l-request@lists.swau.edu
> >Unsubscribe: "unsubscribe <password>" in message body to
> >powerh-l-request@lists.swau.edu
> >http://lists.swau.edu/mailman/listinfo/powerh-l
> >This list is closed, thus to post to the list you must be a
> subscriber.
>
>
> Mike
> .
>
> = = = = = = = = = = = = = = = = = = = = = = = = = = = =
> Mailing list: powerh-l@lists.swau.edu
> Subscribe: "subscribe" in message body to
> powerh-l-request@lists.swau.edu
> Unsubscribe: "unsubscribe <password>" in message body to
> powerh-l-request@lists.swau.edu
> http://lists.swau.edu/mailman/listinfo/powerh-l
> This list is closed, thus to post to the list you must be a
> subscriber.
>