Thanks Wally for bringing that to my attention. Here's the new code
which now works with a compiled I-TYPE DICT item:

     DONE = 0 ; prompt ''
     open "DICT","CONF" to D.CONF else stopm "No DICT CONF file"
     read DICT.ITYPE from D.CONF,"TODAY" else DICT.ITYPE = 'Not Found'
     open "CONF" to CONF else stopm "No CONF file"
     select CONF
     loop
        readnext KEY else DONE = 1
     until DONE do
        read REC from CONF,KEY then
           print KEY:' has Date of ': ITYPE(DICT.ITYPE)
           print "stop (Y) ? "
           input ANS,1
           if upcase(ANS) = 'Y' then stop
        end
     repeat
  end

Please note that neither @ID or @RECORD is needed. The syntax above runs
just fine. I don't know if that's an undocumented feature...

Again thanks to all who responded and got the old gray matter active,

Karl


On Sun, January 10, 2010 6:17 pm, Wally Terhune wrote:
> Is dict item F01 actually a compiled I type dict item?
>
>
> Wally Terhune
> U2 Support Architect
> Rocket Software
> Tel: (720) 475-8055
> Mobile: (303) 807-6222
> [email protected]
> [email protected]
> ________________________________________
> From: [email protected]
> [[email protected]] On Behalf Of Karl Pearson
> [[email protected]]
> Sent: Friday, January 08, 2010 12:12 PM
> To: [email protected]
> Subject: [U2] ITYPE BASIC use?
>
> I have a client who would like to use the uniVerse ITYPE function but
> the HELP (HELP BASIC ITYPE) documentation is wrong.
>
> For example, here's a sample piece of code, which duplicates the HELP
> code sample:
>
>  6       DONE = 0
>  7
>  8       open "DICT","CONF" to D.CONF else stopm "No DICT CONF file"
>  9       read DICT.ITYPE from D.CONF,"F01" else DICT.ITYPE = 'Not Found'
> 10
> 11       open "CONF" to CONF else stopm "No CONF file"
> 12       select CONF
> 13
> 14       loop
> 15          readnext KEY else DONE = 1
> 16       until DONE do
> 17          read REC from CONF,KEY then
> 18             print KEY:' has CustNO': ITYPE(DICT.ITYPE)
> 19             print "stop? "
> 20             input ANS,1
> 21             if upcase(ANS) = 'Y' then stop
> 22          end
> 23       repeat
> 24    end
>
> Executing this code results in this error:
>
> "Line 18, ITYPE called with bad data item"
>
> Any thoughts?
>
> TIA,
>
> ---
> Karl Pearson
> [email protected]
> Owner/Administrator of the sites at
> http://ourldsfamily.com
> ---
> "To mess up your Linux PC, you have to really work at it;
>  to mess up a microsoft PC you just have to work on it."
> ---
>  Democracy is two wolves and a lamb voting on what to have
>  for lunch. Liberty is a well-armed lamb contesting the vote.
>  --Benjamin Franklin
> ---
>  Prayer for Obama, et al: http://scriptures.lds.org/en/ps/109/8#8 (~)
> ---
>
> _______________________________________________
> U2-Users mailing list
> [email protected]
> http://listserver.u2ug.org/mailman/listinfo/u2-users
> _______________________________________________
> U2-Users mailing list
> [email protected]
> http://listserver.u2ug.org/mailman/listinfo/u2-users
>


---
Karl Pearson
[email protected]
Owner/Administrator of the sites at
http://ourldsfamily.com
---
"To mess up your Linux PC, you have to really work at it;
 to mess up a microsoft PC you just have to work on it."
---
 Democracy is two wolves and a lamb voting on what to have
 for lunch. Liberty is a well-armed lamb contesting the vote.
 --Benjamin Franklin
---
 Prayer for Obama, et al: http://scriptures.lds.org/en/ps/109/8#8 (~)
---

_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to