Re: [U2] A Descriptors and its Subroutine Issue

Ed Clark <[email protected]>
Newsgroups gmane.comp.db.u2.general
Message-ID <[email protected]>
Curious why you are doing this as a user exit?
iirc, there are differences between using an A and an Itype. In an itype, the subroutine is called just once for each item in the file. With an A-type, the subroutine is going to be called once for each value/subvalue in the attribute referenced by the amc on line 2 of the dictionary entry (which in this case is 0 so there will only be once value, but be careful using it on other attributes in the item)

The subroutine needs to be cataloged with a "$" prefix, $RNS.CB.MAS.SUB rather than just RNS.CB.MAS.SUB, and I think it needs to be cataloged globally.
>From the universe manual:

Cataloging User Exits
Once you have written and compiled the UniVerse BASIC subroutine, you must 
catalog the program. User exits are cataloged globally by specifying the user exit 
name with a dollar sign in front of it. For example, to catalog the user exit U50MB 
in the example shown earlier, use the CATALOG command as follows: 
>CATALOG 
        CATALOG NAME or LOCAL = $50MB  
        FILENAME = APP.PROGS 
        PROGRAM NAME = 50MB
Or you can use the form: 
>CATALOG APP.PROGS $50MB 
Like any other program, a user exit must be compiled before you can catalog it. See 
Chapter 8, “ UniVerse BASIC,” for more information about cataloging UniVerse 
BASIC programs. 

Cataloging Programs in PICK Accounts
PICK and IN2 flavor accounts do not permit global cataloging; therefore you must 
either catalog the program in a different flavor account or create an INFORMATION 
flavor CATALOG entry in your PICK account. To create an INFORMATION flavor 
CATALOG entry, create a VOC entry which is the same as the entry for CATALOG, 
except that field 6 is defined as INFORMATION.FORMAT instead of 
PICK.FORMAT. 

On Jan 30, 2014, at 3:07 PM, randyleesmith <[email protected]> wrote:

> I'm not use to making these.
> 
> I based what I was doing on another A type which also called a Subroutine.
> 
> My A Type record;
> 
> SB.SVC>ED DICT ADFILA RNS.CB.MAS
> 
> 10 lines long.
> 
> ----:
> 0001: A
> ----:
> 0002: 0
> ----:
> 0003: Reason Not To Be Sent
> ----:
> 0004: M
> ----:
> 0005:
> ----:
> 0006:
> ----:
> 0007:
> ----:
> 0008: URNS.CB.MAS.SUB
> ----:
> 0009: L
> ----:
> 0010: 20
> Bottom at line 10.
> 
> I cataloged the process RNS.CB.MAS.SUB
> 
> But get this error;
> 
> "$RNS.CB.MAS.SUB" is not in the CATALOG space.
> [ENOENT] No such file or directory
> Incorrect VOC entry for $RNS.CB.MAS.SUB.
> Unable to load subroutine.
> 
> Not seen this before. Any ideas?
> 
> I know I can just make an I type, and I have done those before.
> I thought this might be less work in making and porting over to production.
> 
> 
> 
> 
> -----
> I used to be an Optimist until I knocked over the glass.
> --
> View this message in context: http://u2-universe-unidata.1073795.n5.nabble.com/A-Descriptors-and-its-Subroutine-Issue-tp42599.html
> Sent from the U2 - Users mailing list archive at Nabble.com.
> _______________________________________________
> 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.