SV: [U2] [UD] How to build a VOC to a file on another machine...
Hi, you should do this via NFA, at least we do. The file pointer to the VOC-file on the remote server could look like this: 001: FX 002: UDT 003: MACHINE remote_server, VOC /test/account1, FILE VOC, UDTHOME /apps/ud52,UDTBIN /apps/ud52/bin Then you need to set up NFA of course Bjvrn Eklund -Ursprungligt meddelande- Fren: DAVID WOLVERTON [mailto:[EMAIL PROTECTED] Skickat: den 1 oktober 2005 18:27 Till: u2-users@listserver.u2ug.org Dmne: [U2] [UD] How to build a VOC to a file on another machine... I am writing a simple Replication 'Heartbeat' in a phantom process. I have two sets of 'DIR' files, one on the subscriber, one on the publisher - one folder per Replication Group. I want to write a transaction on the publisher, then read from the subscriber a few minutes later to make sure it's there to 'know' that replication is actually up and running -- if the transaction does not show up on the subscriber, the phantom will write to a file our standard menu processes will watch. I'm having a problem building a pointer from one machine to the other - I've made the Subscriber files 'shared' and can see them from the Publisher's explorer window ... But how do I turn that in a VOC entry? Example: REPTEST01 is the file on the Subscriber: DIR REPTEST01 D_REPTEST01 I've created a share called SUB_REPTEST01 (so the name on the Publisher will be different) I can see it from the Publisher's Explorer Window under \\SubHost\SUB_REPTEST01 And I plan to use the 'local' dictionary for file opens since all I need is to read, no locking, no worries... So I tried this as a VOC on the Publisher account: DIR \\SubHost\SUB_REPTEST01 D_REPTEST01 but this gives me an errno-2: No such file or directory can not stat() in U_get_fileid(),fname=\\SubHost\SUB_REPTEST01 Open file error. I don't have OFS running here - is that needed? Or what simple thing am I missing to open this 'remote' file? David W. === Sunset Programming, Inc. Developing Today for a Productive Tomorrow P 214.337.8204 F 469.442.1368 E [EMAIL PROTECTED] === CONFIDENTIALITY NOTICE: This e-mail message, and any accompanying documents, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure, distribution or copying is prohibited. If you are not the intended recipient, please contact our office by email or by telephone at (214) 337-8204 and immediately destroy all copies of the original message. === --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] [UD] How to build a VOC to a file on another machine...
CA.TEST: DIR \\192.168.0.30\F\unidata\current\qa\CAPROGS \\dev\F\unidata\current\qa\d_CAPROGS Works fine for me. UD 5.1.27 on Windows. F is a shared directory. DEV resolves to the same IP address as line 2 (the two are interchangeable). I find the problem with mapping a drive is keeping the map between sessions. Hth Colin Alfke Calgary -Original Message- From: David Wolverton Doh!! Just realized I should make it a Mapped Network Drive on the Publisher, and it will then open the file totally clueless that the drive is on another machine... As Emily Litella would say, Never Mind -Original Message- From: DAVID WOLVERTON I am writing a simple Replication 'Heartbeat' in a phantom process. I have two sets of 'DIR' files, one on the subscriber, one on the publisher - one folder per Replication Group. I want to write a transaction on the publisher, then read from the subscriber a few minutes later to make sure it's there to 'know' that replication is actually up and running -- if the transaction does not show up on the subscriber, the phantom will write to a file our standard menu processes will watch. I'm having a problem building a pointer from one machine to the other - I've made the Subscriber files 'shared' and can see them from the Publisher's explorer window ... But how do I turn that in a VOC entry? Example: REPTEST01 is the file on the Subscriber: DIR REPTEST01 D_REPTEST01 I've created a share called SUB_REPTEST01 (so the name on the Publisher will be different) I can see it from the Publisher's Explorer Window under \\SubHost\SUB_REPTEST01 And I plan to use the 'local' dictionary for file opens since all I need is to read, no locking, no worries... So I tried this as a VOC on the Publisher account: DIR \\SubHost\SUB_REPTEST01 D_REPTEST01 but this gives me an errno-2: No such file or directory can not stat() in U_get_fileid(),fname=\\SubHost\SUB_REPTEST01 Open file error. I don't have OFS running here - is that needed? Or what simple thing am I missing to open this 'remote' file? David W. --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
Re: [U2] Good Programming Practice Question.........
I do like your use of the word 'strategy'. That probably better defines a programmer's approach to solving any particular problem, especially given the diverse environments one may encounter. Mark Johnson - Original Message - From: Timothy Snyder [EMAIL PROTECTED] To: u2-users@listserver.u2ug.org Sent: Sunday, October 02, 2005 4:59 AM Subject: Re: [U2] Good Programming Practice Question. Mark Johnson [EMAIL PROTECTED] wrote on 10/01/2005 01:00:33 AM: Files that can't open are usually solved pretty quickly either after installing the software or making the changes. The downstream elaborate errmsgs for OPEN CUSTOMER TO F.CUSTOMER ELSE PRINT CANNOT OPEN THE CUSTOMER FILE. PLEASE CONTACT YOUR PROGRAMMER. PROGRAM TERMINATING ; STOP OPEN INVENTORY TO F.INVENTORY ELSE PRINT CANNOT OPEN THE INVENTORY FILE. PLEASE CONTACT YOUR PROGRAMMER. PROGRAM TERMINATING ; STOP or whatever the verbose message/mechanism is, is just an exercise in typing. 99.44% of the time the ELSE clause is not realized. So because it's not likely that an open will fail, it's not worth programming for? Can you guarantee that the files will never be placed on a network or external device that could fail? Or that the file could be deleted or otherwise rendered unusable? I realize that 99.44% is a reference to an old Ivory Soap ad, but imagine 56 opens out of 10,000 failing - that would certainly be worth coding for. Even if there's one chance in a million that an open will fail, that's worth coding for. I cringe when I see OPEN ... ELSE STOP 201, 'WIDGET'. (I've also even seen it with just STOP, without even referencing the file name.) That means the poor user will be placed at the command prompt with no idea of what to do. (And, noting that you advocate doing OPENs in external subroutines, that could leave transactions partially committed. Even if performance isn't a concern for you, this should be enough justification to avoid that practice.) I worked with a customer once that had just installed UniData with RFS. Everything went well through months of development and testing. Then, on the first day running live, OPEN statements started hitting their ELSE clauses. It turned out that the N_AFT parameter hadn't been set high enough. For those not familiar with RFS, suffice it to say that there wasn't enough space in a table that maintains open recoverable files, causing the opens to fail. Fortunately, that customer had some intelligence built into their open routines, which logged the problems and got the users out fairly gently. One strategy that I like is to have the ELSE clause add the file name to a list. Then after all of the opens have been attempted, see if the list is empty - if not, report on the files that couldn't be opened, log them somewhere, and get the user back to a safe point such as a menu. It may require a bit of typing, but those few keystrokes seem well worth the effort. Tim Snyder Consulting I/T Specialist , U2 Professional Services North American Lab Services DB2 Information Management, IBM Software Group 717-545-6403 [EMAIL PROTECTED] --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] GT vs (was RE: U2 Users Digest... (really Standards))
Guess I lost something along the line here.. what is the 4 letter word? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mark Johnson Sent: Saturday, October 01, 2005 12:56 AM To: u2-users@listserver.u2ug.org Subject:Re: [U2] GT vs (was RE: U2 Users Digest... (really Standards)) A few years ago I was on a pretty good multi-person phone interview with a large Ohio software company when the topic of 'standards' came up. I responded that I respect the 'house rules'. Then they asked whether I use the 4 letter word and when I replied yes, you'd have thought I was I was dressing up as Hitler for a Bar Mitzvah. They couldn't have concluded that otherwise 60 minute interview any faster. It was like I had the plague. My 1 cent. --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] GT vs (was RE: U2 Users Digest... (really Standards))
Guess I lost something along the line here.. what is the 4 letter word? GOTO --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] GT vs (was RE: U2 Users Digest... (really Standards))
Hi, I will be out of the office from the afternoon of 10/03/05 through Wednesday, 10/5/05. I will return to the office on 10/06. I will no have access to e-mail or voice mail during this time. If a you need an immediate response to your e-mail please e-mail [EMAIL PROTECTED] or you can call Frank at extension 467. Thanks and have a great day! Josh --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] GT vs (was RE: U2 Users Digest... (really Standards))
the four letter word, also known as the-command-that-must-not-be-named, It is the command which generates much debate over whether it should be used, or abolished from all eternity. It's use in literature is quite appropriate (ie. My mother asked me to GOTO the store.) George -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Marilyn Hilb Sent: Monday, October 03, 2005 11:57 AM To: u2-users@listserver.u2ug.org Subject: RE: [U2] GT vs (was RE: U2 Users Digest... (really Standards)) Guess I lost something along the line here.. what is the 4 letter word? --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
[U2] [AD] Eclipse Plug-in for RedBack
U2logic a major provider of web-based tools, applications and services for the U2 driven business announces the latest generation of XLr8 as a plug-in to the Eclipse. XLr8 is a rapid web-forms development tool for Unidata and Universe databases. XLr8 for Eclipse Beta 1 will be available on October 1st and is free to XLr8 users under current maintenance agreements. Those interested in trying XLr8 for Eclipse please contact [EMAIL PROTECTED] or call us toll free at 1-866-XLr8me2 (866-957-8632). --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] GT vs (was RE: U2 Users Digest... (really Standards))
Yes, the command which when properly utilized is innocent in and of itself, ...but when used in excess can force you trod through GOTO HELL before full understanding is achieved. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of George Gallen Sent: Monday, October 03, 2005 09:30 To: u2-users@listserver.u2ug.org Subject: RE: [U2] GT vs (was RE: U2 Users Digest... (really Standards)) the four letter word, also known as the-command-that-must-not-be-named, It is the command which generates much debate over whether it should be used, or abolished from all eternity. It's use in literature is quite appropriate (ie. My mother asked me to GOTO the store.) George -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Marilyn Hilb Sent: Monday, October 03, 2005 11:57 AM To: u2-users@listserver.u2ug.org Subject: RE: [U2] GT vs (was RE: U2 Users Digest... (really Standards)) Guess I lost something along the line here.. what is the 4 letter word? --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] GT vs (was RE: U2 Users Digest... (really Standards))
Marilyn Hilb wrote: Guess I lost something along the line here.. what is the 4 letter word? Can't be anything other than... GOTO --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] the 4 letter word
Funny! You folks are a riot. Thanks for all the answers. I suspected that is what it was. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of George Gallen Sent: Monday, October 03, 2005 11:30 AM To: u2-users@listserver.u2ug.org Subject:RE: [U2] GT vs (was RE: U2 Users Digest... (really Standards)) the four letter word, also known as the-command-that-must-not-be-named, It is the command which generates much debate over whether it should be used, or abolished from all eternity. It's use in literature is quite appropriate (ie. My mother asked me to GOTO the store.) George -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Marilyn Hilb Sent: Monday, October 03, 2005 11:57 AM To: u2-users@listserver.u2ug.org Subject: RE: [U2] GT vs (was RE: U2 Users Digest... (really Standards)) Guess I lost something along the line here.. what is the 4 letter word? --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
[U2] Unidata Question
I am moving some old programs to Unidata and can not get the following to work. Will someone show me the Unidata way (U mode). Example: 0001 PROMPT 0002 XX = 10001 0003 YY = 2002 * (-1) 0004 FM.01 = R26,E(#9) -- Unidata does not like this. 0005 PRINT XX FM.01 0006 PRINT YY FM.01 0007 0008 0009 END Above prints out: GRS.TT 100.01 20.02 Thanks. George R Smith Programmer / Analyst 479.684.3382 direct 479.684.3403 fax www.budgetext.com http://www.budgetext.com/ CONFIDENTIALITY NOTICE: The materials in this electronic mail transmission (including all attachments) are private and confidential and are the property of the sender. The information contained in the material is privileged and is intended only for the use of the named addressee(s). If you are not the intended addressee, be advised that any unauthorized disclosure, copying, distribution or the taking of any action in reliance on the contents of this material is strictly prohibited. If you received this electronic mail message in error, please immediately notify the sender by telephone at 888-869-0366 or send an electronic message to [EMAIL PROTECTED], and thereafter, destroy the electronic message immediately. [demime 1.01d removed an attachment of type image/gif which had a name of image001.gif] --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
Re: [U2] Unidata Question
What would the expected outcome look like? Not being familiar with that format syntax, I'm not sure what it's supposed to do. Gordon J. Glorfield Sr. Applications Developer MAMSI (A UnitedHealth Company) 301-360-8839 [EMAIL PROTECTED] wrote on 10/03/2005 02:40:56 PM: I am moving some old programs to Unidata and can not get the following to work. Will someone show me the Unidata way (U mode). Example: 0001 PROMPT 0002 XX = 10001 0003 YY = 2002 * (-1) 0004 FM.01 = R26,E(#9) -- Unidata does not like this. 0005 PRINT XX FM.01 0006 PRINT YY FM.01 0007 0008 0009 END Above prints out: GRS.TT 100.01 20.02 Thanks. George R Smith Programmer / Analyst 479.684.3382 direct 479.684.3403 fax www.budgetext.com http://www.budgetext.com/ CONFIDENTIALITY NOTICE: The materials in this electronic mail transmission (including all attachments) are private and confidential and are the property of the sender. The information contained in the material is privileged and is intended only for the use of the named addressee(s). If you are not the intended addressee, be advised that any unauthorized disclosure, copying, distribution or the taking of any action in reliance on the contents of this material is strictly prohibited. If you received this electronic mail message in error, please immediately notify the sender by telephone at 888-869-0366 or send an electronic message to [EMAIL PROTECTED], and thereafter, destroy the electronic message immediately. [demime 1.01d removed an attachment of type image/gif which had a name of image001.gif] --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ This e-mail, including attachments, may include confidential and/or proprietary information, and may be used only by the person or entity to which it is addressed. If the reader of this e-mail is not the intended recipient or his or her authorized agent, the reader is hereby notified that any dissemination, distribution or copying of this e-mail is prohibited. If you have received this e-mail in error, please notify the sender by replying to this message and delete this e-mail immediately. --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] Unidata Question
Gordon, Did you inhale too much melaleucca oil :). Look at the bottom of the post. GRS.TT 100.01 20.02 George R Smith -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gordon J Glorfield Sent: Monday, October 03, 2005 4:04 PM To: u2-users@listserver.u2ug.org Subject: Re: [U2] Unidata Question What would the expected outcome look like? Not being familiar with that format syntax, I'm not sure what it's supposed to do. Gordon J. Glorfield Sr. Applications Developer MAMSI (A UnitedHealth Company) 301-360-8839 [EMAIL PROTECTED] wrote on 10/03/2005 02:40:56 PM: I am moving some old programs to Unidata and can not get the following to work. Will someone show me the Unidata way (U mode). Example: 0001 PROMPT 0002 XX = 10001 0003 YY = 2002 * (-1) 0004 FM.01 = R26,E(#9) -- Unidata does not like this. 0005 PRINT XX FM.01 0006 PRINT YY FM.01 0007 0008 0009 END Above prints out: GRS.TT 100.01 20.02 Thanks. George R Smith Programmer / Analyst 479.684.3382 direct 479.684.3403 fax www.budgetext.com http://www.budgetext.com/ CONFIDENTIALITY NOTICE: The materials in this electronic mail transmission (including all attachments) are private and confidential and are the property of the sender. The information contained in the material is privileged and is intended only for the use of the named addressee(s). If you are not the intended addressee, be advised that any unauthorized disclosure, copying, distribution or the taking of any action in reliance on the contents of this material is strictly prohibited. If you received this electronic mail message in error, please immediately notify the sender by telephone at 888-869-0366 or send an electronic message to [EMAIL PROTECTED], and thereafter, destroy the electronic message immediately. [demime 1.01d removed an attachment of type image/gif which had a name of image001.gif] --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ This e-mail, including attachments, may include confidential and/or proprietary information, and may be used only by the person or entity to which it is addressed. If the reader of this e-mail is not the intended recipient or his or her authorized agent, the reader is hereby notified that any dissemination, distribution or copying of this e-mail is prohibited. If you have received this e-mail in error, please notify the sender by replying to this message and delete this e-mail immediately. --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] Unidata Question
I think GG was simply asking what it is supposed to look like vs. what it does look like. Are you saying that 20.02 is what it is supposed to look like? If so, what does it actually look like? -K --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] Unidata Question
On Mon 10/3/2005 13:41, George Smith [EMAIL PROTECTED] wrote: snip I am moving some old programs to Unidata and can not get the following to work. Will someone show me the Unidata way (U mode). snip Here is a snippet that produces the desired output,using BASICTYPE U: 0001 XX = 10001 0002 YY = 2002 * (-1) 0003 FM.01 = R#9 0004 PRINT OCONV(XX,MR2,E) FM.01 0005 PRINT OCONV(YY,MR2,E) FM.01 Output ^^100.01 ^^20.02 BTW, is you will check the value in STATUS() after issuing the FMT command, it will give you an indication of the problem. In the case of your original example, it was returning a value of 2, meaning the conversion code was invalid. HTH Regards, Robert L. DunnMiller CIO, dmcs, Inc. [EMAIL PROTECTED] Tel: +1 903 763 1175 CONFIDENTIALITY NOTICE: This email and the attachment(s) hereto (if any) contain confidential information that is privileged and intended only for the addressee(s) hereof. If you are not an intended recipient, you are hereby notified that any disclosure, copying, distribution or use of this e-mail and/or the accompanying attachment(s) is strictly prohibited. If you have received this e-mail in error, please immediately notify the sender by return e-mail. --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
[U2] Herve Balestrieri/France/IBM est absent ce jour Mardi 04/09/2005 et sera de retour le Mercredi 05/09/2005. In english : is out of office today Tuesday October 4th. I will be back on Wednesday
I will be out of the office starting 04/10/2005 and will not return until 05/10/2005. Pour les clients accidant au Support Technique des produits IBM U2, veuillez renvoyer votre message sur : [EMAIL PROTECTED] Merci For non-french speaking customers : If your IBM U2 products Technical Support centre is France, please re-send messages to : [EMAIL PROTECTED] Otherwise, IBM U2 products Technical Support in UK/EMEA email is : [EMAIL PROTECTED] Support Technique IBM - Produits U2 IBM Data Management Solutions Tel.: N0 VERT International 00 800 2535 2535 (France et Belgique) +44 208 844 3076 (autres pays/other countries) Fax: +33 (0) 49 31 45 58 Web: http://www.ibm.com/software/u2/ IBM Centre de Support Technique IBM Produits U2 7630 - 04S03 Immeuble Marne La Vallie 1 1, Place Jean-Baptiste Climent 93881 Noisy-le-Grand Cedex France e-mail Support Technique IBM U2 : [EMAIL PROTECTED] --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] Unidata Question
Robert, Thanks, I thought that I would have to use the oconv function. Just means I have to do a small rewrite of the sub that does all the display. thanks again grs Here is a snippet that produces the desired output,using BASICTYPE U: 0001 XX = 10001 0002 YY = 2002 * (-1) 0003 FM.01 = R#9 0004 PRINT OCONV(XX,MR2,E) FM.01 0005 PRINT OCONV(YY,MR2,E) FM.01 --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
[U2] Java calss calls a universe subroutine
Hi list, I need you guys help. I am a Java programmer and new to Universe. Could anybody show me how to call a universe subroutine which returns a list of values? Ex. sub1 (var in) Returns three rows: a1,b1,c1 a2,b2,c2 a3,b3,c3 How could I loop through these three rows and get each value? Is something like: UniSubroutine mSub = mSession.subroutine ( sub1, 10); mSub.setArg( 1, 05 ); mSub.call(); Should I use UniDataSet for the ResultSet returned? Thanks in advance. Kathy --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
Re: [U2] the 4 letter word
Being one of the most (four letter word) supporters (probably because I understand how to use it properly), notice I didn't bring it up. Mark Johnson - Original Message - From: Marilyn Hilb [EMAIL PROTECTED] To: u2-users@listserver.u2ug.org Sent: Monday, October 03, 2005 2:21 PM Subject: RE: [U2] the 4 letter word Funny! You folks are a riot. Thanks for all the answers. I suspected that is what it was. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of George Gallen Sent: Monday, October 03, 2005 11:30 AM To: u2-users@listserver.u2ug.org Subject: RE: [U2] GT vs (was RE: U2 Users Digest... (really Standards)) the four letter word, also known as the-command-that-must-not-be-named, It is the command which generates much debate over whether it should be used, or abolished from all eternity. It's use in literature is quite appropriate (ie. My mother asked me to GOTO the store.) George -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Marilyn Hilb Sent: Monday, October 03, 2005 11:57 AM To: u2-users@listserver.u2ug.org Subject: RE: [U2] GT vs (was RE: U2 Users Digest... (really Standards)) Guess I lost something along the line here.. what is the 4 letter word? --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
Re: [U2] Java calss calls a universe subroutine
In its simplest form there are 2 subroutines, internal and external. Internal subroutines are contained within the primary source code and have full access to every variable the primary program has. You are not really leaving the program. You're just in another place with a known place to go back to (RETURN). The routine's labels are either numeric or alphanumeric starting with a letter. A=11 ; GOSUB 100 A=92 ; GOSUB 100 STOP 100 PRINT A+1 RETURN displays 12 then 93. External subroutines are themselves separate compiled programs that need to be registered (cataloged) in a common area, either the VOC (each account's root directory) or a shared directory system, ie CTLG or CTLGTB. The major advantage is that the same routine can be shared by one or more other programs as well as dictionary items. Thus, all the necessary information must be passed to the subroutine either in a parameter list, standard COMMON or Named COMMON. The most obvious is the parameter list. For example A=5 ; B=13 CALL MULTIPLY(A,B,ANS) PRINT ANS A=10 ; B=20 CALL MULTIPLY(A,B,ANS) PRINT ANS END SUBROUTINE MULTIPLY(FIRSTNUM, SECONDNUM, ANSWER) ANSWER=FIRSTNUM * SECONDNUM RETURN ;* to calling program END If you were to read the source code of a contemporary language, ie VB, the called subs are non-drop-through parts of the same program. Unless you incorporate DLL's or other MS magic, you're basically in the same single program. In MS, CALL and GOSUB are somewhat interchangable. In MV, they're night and day different with the only similarity being their conclusion with a RETURN. As with all parameter lists and COMMONS, the variables must be in sync. MV has 3 kinds of variables, Dimensioned arrays, File handles and everything else. We do not have integer, floating, long, alphabetic, boolean or other tricky variables like other languages offer. If it's not a dimensioned array or a file handle, it's just a variable. BTW, the entire database concept in variables is called a dynamic array which is nothing more than a fancy alpha-numeric string variable with certain ascii characters as field delimiters. It qualifies as an 'everything else' as well. OPEN INVENTORY TO F.INVENTORY ELSE STOP (no flames please) DIM A(100) ; MAT A= B=BOY ; C=39; D=FRED CALL WHATEVER(F.INVENTORY, MAT A, B, C, D, TOMMY) PRINT TOMMY END SUBROUTINE WHATEVER(F.INVENTORY, MAT A, B, C, D, TOMMY) DIM A(100) MATREAD A FROM F.INVENTORY, B ELSE MAT A= TOMMY=A(C): :D RETURN ;* to calling program I'm sure that there are many programming books to offer examples of these 2 kinds of subroutines. You can also review the existing source code that you're dealing with and begin developing your MV skillset by learning the 'house rules' methods therein. Keep in mind that MV is non-standardized and you will be witness to much discussion in this forum on the various ways to skin a cat. So to answer your question, you make up your own list of variables to provide and variables to obtain and place them in the parameter list and let the sub do its magic. Mine were ANSWER and TOMMY. My 2 cents Mark Johnson - Original Message - From: Vance, Kathy [EMAIL PROTECTED] To: u2-users@listserver.u2ug.org Sent: Monday, October 03, 2005 10:15 PM Subject: [U2] Java calss calls a universe subroutine Hi list, I need you guys help. I am a Java programmer and new to Universe. Could anybody show me how to call a universe subroutine which returns a list of values? Ex. sub1 (var in) Returns three rows: a1,b1,c1 a2,b2,c2 a3,b3,c3 How could I loop through these three rows and get each value? Is something like: UniSubroutine mSub = mSession.subroutine ( sub1, 10); mSub.setArg( 1, 05 ); mSub.call(); Should I use UniDataSet for the ResultSet returned? Thanks in advance. Kathy --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] Java calss calls a universe subroutine
Hi Kathy , now for the simple (useable) answer , ... UniSubroutine mSub = mSession.subroutine ( *SUB1, 2); UniDynArray returnValue=Session.CreateDynArray(); mSub.SetArg(0,returnValue); mSub.SetArg(1,05); mSub.Call(); returnVal = mSub.GetArgDynArray(0); string val11 = returnValue.Extract(1,1).StringValue; string val12 = returnValue.Extract(1,2).StringValue; string val13 = returnValue.Extract(1,3).StringValue; string val21 = returnValue.Extract(2,1).StringValue; string val22 = returnValue.Extract(2,2).StringValue; string val23 = returnValue.Extract(2,3).StringValue; string val31 = returnValue.Extract(3,1).StringValue; string val32 = returnValue.Extract(3,2).StringValue; string val33 = returnValue.Extract(3,3).StringValue; ... The universe subroutine catalogued as *SUB1 would look like this : SUBROUTINE SUB1( returnValue , inputValue ) returnValue= returnValue1,1=11 returnValue1,2=12 returnValue1,3=13 returnValue1,1=21 returnValue1,2=22 returnValue1,3=23 returnValue1,1=31 returnValue1,2=32 returnValue1,3=33 END -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Vance, Kathy Sent: Monday, October 03, 2005 10:15 PM To: u2-users@listserver.u2ug.org Subject: [U2] Java calss calls a universe subroutine Hi list, I need you guys help. I am a Java programmer and new to Universe. Could anybody show me how to call a universe subroutine which returns a list of values? Ex. sub1 (var in) Returns three rows: a1,b1,c1 a2,b2,c2 a3,b3,c3 How could I loop through these three rows and get each value? Is something like: UniSubroutine mSub = mSession.subroutine ( sub1, 10); mSub.setArg( 1, 05 ); mSub.call(); Should I use UniDataSet for the ResultSet returned? Thanks in advance. Kathy --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/