[U2] Obtain the last spool number Universe generated

2011-10-31 Thread Jean Pierre Boishardy
we are in universe version 10.1.22 /AIX 5.3 To obtain the last job number created by a user , we use the following shell script : sh -c \`cat /.uvhome`/bin/analyze.shm -p|grep sp_job_id| awk '{if (NF==NR) print $0}'|awk 'BEGIN {OFS=:}{print $2}'\ But when the server is overloaded the job number

[U2] [ot] Is it just me.....

2011-10-31 Thread George Gallen
Or was I the only person that wasn't thinking wine during this commercial? http://www.youtube.com/watch?v=uS0fwYKCvIE ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users

Re: [U2] Obtain the last spool number Universe generated

2011-10-31 Thread George Gallen
Were you looking for the last job# for That user# or the last job# by any user? If for that user# we use the following: SUBROUTINE RETURN.SETPTR(JOBNAME,PON) * * RETURN-SETPTR - THIS SUBROUTINE WILL RETURN IN JOBNAME THE CURRENT * SPOOL WILL GO TO. *

Re: [U2] Obtain the last spool number Universe generated

2011-10-31 Thread George Gallen
This subroutine must be run by that user# in order to function correctly. And it returns the HOLD filename, not the spooler number - sorry. George -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of George Gallen

Re: [U2] Using 'MATCH'

2011-10-31 Thread Greg Coelho
Hey Guys, I am concatenating an alpha code into a string providing that the code does not already exist (in the string). If my existing string = X.STRING and my code = X.CODE should the following work? IF X.STRING MATCH X.CODE THEN END ELSE X.STRING = X.STRING:',':X.CODE END Thanks! Greg

Re: [U2] Using 'MATCH'

2011-10-31 Thread Wjhonson
Does Matches recognize comma as a delimiter? I don't think it does. IF NOT(X.STRING) MATCH X.CODE THEN X.STRING1,-1 = X.CODE -Original Message- From: Greg Coelho coe...@american.edu To: u2-users u2-users@listserver.u2ug.org Sent: Mon, Oct 31, 2011 10:37 am Subject: Re: [U2] Using

Re: [U2] Using 'MATCH'

2011-10-31 Thread Martin Braid
Hi Greg, I would convert your string to a VM array, use the LOCATE syntax to add it if relevant and then convert back to a string. Martin (I am not going to worry why you aren't just using an array) -Original Message- From: u2-users-boun...@listserver.u2ug.org

Re: [U2] Using 'MATCH'

2011-10-31 Thread Woodward, Bob
You might also be able to use COUNT. IF COUNT(X.STRING,X.CODE) = 0 THEN X.STRING := X.CODE Not knowing what your potential codes are, though, they may or may not fit your needs. -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org]

Re: [U2] Using 'MATCH'

2011-10-31 Thread George Gallen
How about? LOCATE X.CODE IN CHANGE(X.STRING,,,CHAR(254)) SETTING POS ELSE X.STRING=X.STRING:,:X.CODE Or LOCATE X.CODE IN CHANGE(X.STRING,,,CHAR(254))1 SETTING POS ELSE X.STRING=X.STRING:,:X.CODE Depending on which UV Flavor your running -Original Message- From:

Re: [U2] Using 'MATCH'

2011-10-31 Thread Wjhonson
If there is a need to extrude the result comma-delimited then IF NOT(X.STRING) MATCH X.CODE THEN X.STRING1,-1 = X.CODE CONVERT , TO @VM IN X.STRING -Original Message- From: George Gallen ggal...@wyanokegroup.com To: U2 Users List u2-users@listserver.u2ug.org Sent: Mon, Oct 31, 2011

Re: [U2] Using 'MATCH'

2011-10-31 Thread Wjhonson
Oops! Recte CONVERT @VM TO , IN X.STRING -Original Message- From: Wjhonson wjhon...@aol.com To: u2-users u2-users@listserver.u2ug.org Sent: Mon, Oct 31, 2011 11:50 am Subject: Re: [U2] Using 'MATCH' f there is a need to extrude the result comma-delimited then IF NOT(X.STRING)

Re: [U2] Using 'MATCH'

2011-10-31 Thread George Gallen
I would normally work with the dynamic array, and convert when done Aside from CONVERT @VM TO , IN X.STRING Also... X.STRING = '' : CHANGE(X.STRING,@VM,',') : '' If you need quoted comma delimited - this will NOT however, change embedded 's which will corrupt your data -Original

Re: [U2] Using 'MATCH'

2011-10-31 Thread George Smith
If you are trying to look for an arbitrary delimited string, I think the safest thing to do is IF INDEX(',':X.STRING:',', ',':X.CODE:',',1) THEN X.STRING=X.STRING:',':X.CODE On Mon, Oct 31, 2011 at 10:55 AM, Woodward, Bob bob_woodw...@k2sports.comwrote: You might also be able to use COUNT.

Re: [U2] Using 'MATCH'

2011-10-31 Thread George Smith
Hit the wrong key and sent this incomplete. Finished below On Mon, Oct 31, 2011 at 12:15 PM, George Smith grsassocia...@gmail.comwrote: If you are trying to look for an arbitrary delimited string, I think the safest thing to do is something like IF INDEX(',':X.STRING:',',

Re: [U2] Using 'MATCH'

2011-10-31 Thread Greg Coelho
Guys, Thanks for the great suggestions. I believe that I did get MATCH confused with COUNT thinking that it could navigate a delimiter... In this situation I'm thinking that just using COUNT would be the best solution. I do appreciate the diversity of the solutions presented. Thanks! Greg

Re: [U2] Using 'MATCH'

2011-10-31 Thread George Gallen
Be careful using a straight count, Because HELL will be found in in the word HELLO for instance, and would not be added Make sure you surround your search criteria with the delimiters being used, as noted in one of the replies. So, ,HELL, would not be found if ,HELLO, were in the list. George

Re: [U2] Using 'MATCH'

2011-10-31 Thread Wjhonson
Match *can* navigate a delimiter. It navigates the multi-value delimiter @VM That's the only one it can navigate, but why not use it if it's there ? To me using Match makes the code clear. ___ U2-Users mailing list U2-Users@listserver.u2ug.org

Re: [U2] Using 'MATCH'

2011-10-31 Thread George Gallen
Is it flavor dependent? I tried it under Information flavor : 0001: Y=HELLO 0002: Y1,-1=THERE 0003: IF Y MATCH HELLO THEN PRINT YES ELSE PRINT NO 0004: STOP 0005: END I got NO, unless I set it up incorrectly - could be...I never used for this purpose before. George -Original Message-

Re: [U2] Using 'MATCH'

2011-10-31 Thread Greg Coelho
George, Thanks! This is a good point. I will retain the ',' delimiter when I do my COUNT. Greg From: George Gallen ggal...@wyanokegroup.com To: U2 Users List u2-users@listserver.u2ug.org Date: 10/31/2011 04:45 PM Subject:Re: [U2] Using 'MATCH' Sent by:

Re: [U2] Using 'MATCH'

2011-10-31 Thread Greg Coelho
George, Thanks for pointing this out. I'm running a test now... if it there are any issues I'll switch to MATCH and @VM. Greg From: George Gallen ggal...@wyanokegroup.com To: U2 Users List u2-users@listserver.u2ug.org Date: 10/31/2011 05:10 PM Subject:Re: [U2] Using 'MATCH'

Re: [U2] Using 'MATCH'

2011-10-31 Thread Wjhonson
Your syntax is backward George its not IF Y MATCH HELLO its IF HELLO MATCH Y -Original Message- From: George Gallen ggal...@wyanokegroup.com To: U2 Users List u2-users@listserver.u2ug.org Sent: Mon, Oct 31, 2011 2:10 pm Subject: Re: [U2] Using 'MATCH' Is it flavor dependent? I

Re: [U2] Using 'MATCH'

2011-10-31 Thread Greg Coelho
Guys, I've run a test against 10,000 records and COUNT is performing flawlessly. When I get a minute I'll switch it to MATCH and see how it runs. I agree with the comment that MATCH would be clearer code and would easier to follow... Thanks again, Greg From: Wjhonson wjhon...@aol.com

Re: [U2] Using 'MATCH'

2011-10-31 Thread Mecki Foerthmann
I don't get the problem. Why would you want to do this in the first place? Why not just convert the commas to @VM, use LOCATE and convert the @VM back to commas? BTW if the first string is HELL or it is the first entry then counting ,HELL, won't find it either. KISS! Mecki On 31/10/2011

Re: [U2] Using 'MATCH'

2011-10-31 Thread Greg Coelho
Mechi, I am creating an extract for export to a third party vendor. This requires that I convert a multi-valued field to a single (comma delimited) value. The thought was instead of converting from comma to @VM and then back to comma that we might save the processor a bit of work by keeping

Re: [U2] Using 'MATCH'

2011-10-31 Thread Wols Lists
On 31/10/11 17:37, Greg Coelho wrote: Hey Guys, I am concatenating an alpha code into a string providing that the code does not already exist (in the string). If my existing string = X.STRING and my code = X.CODE should the following work? IF X.STRING MATCH X.CODE THEN END ELSE