• Subject: RE: Valid AS/400 objects
  • From: Walden Leverich <walden@xxxxxxxxxxxxxxx>
  • Date: Thu, 30 Oct 1997 18:37:26 -0500
  • Organization: Tech Software

For the VCP you can use the QLICVTTP API to convert your symbolic type 
(*FILE) to the MI hex type (x'1901'). If the API fails to convert the type 
then the type is not valid. As for the choice program, I suppose you could 
call the API 256 times for types x'00' to x'FF' and record which types 
convert to symbolic names, that would be the complete list of object types. 
However there are two problems with this approach.

1) You are calling the API 256 times. Answer: Who cares. This API is FAST. 
I would guess all 256 calls may take 0.01 seconds total, on a slow machine. 
After all this is a choice program, not something being called for each of 
1 million records.

2) The API requires a type and subtype. Each a 1 byte char from x'00' to 
x'FF' I think all object types have a subtype x'01' but I'm not sure. Does 
anyone have the MI books to confirm this? If all object types do not have a 
x'01' subtype then you will need to call the API 65535 times, at which 
point I suggest you find another solution. Maybe run the API to load a 
table/user space/user index/what ever with the list and use that list to 
load your choice program. Whenever you feel there may be missing types in 
your command rerun the load program.

Hope this helps.

-Walden

-------------------------------
Walden Leverich
Tech Software
walden@techsoftinc.com
www.techsoftinc.com

-----Original Message-----
From:   Vern Hamberg [SMTP:hambergv@goldengate.net]
Sent:   Tuesday, October 28, 1997 2:19 PM
To:     midrange-l@midrange.com
Subject:        Valid AS/400 objects

Hey, y'all

Do you know of a way to get a dynamic list of the valid AS/400 object
types? Are they found in some message, or is there another way? I'd like to
use this in a choice program for commands that deal with objects, without
having to change the code for each release.

TIA

Vernon Hamberg
Systems Software Programmer
Old Republic National Title Insurance Company
400 Second Avenue South
Minneapolis, MN 55401
(612) 371-1111 x480


+---
| 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
+---
+---
| 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
+---


This thread ...


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

This mailing list archive is Copyright 1997-2019 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 here. If you have questions about this, please contact [javascript protected email address].