FAQ Database Discussion Community


Having trouble calling a Proc within a Method within a Class

ruby,proc
I am struggling to debug my issue; I am trying to use a Proc within a method, all inside a class. When I don't type in the "class" details, my program compiles fine; when I specify the class name, however, I get a variety of different errors. Note: I posted...

proc tabulate get `sumproduct` result

sas,proc
data looks like TM a b c A 1 2 0.5 B 2 5 0.4 ideal output is TM c A 0.5 B 0.4 All 3/7 I tried pctsum in proc tabulate. But it doesn't work in the way I expected. proc tabulate data = dat; class TM; var a...

Tcl return vs. last evaluated in proc - internals

return,tcl,proc
When I write a proc in Tcl, which return value is actually the result of another proc I can do either of the following (see implicit example): proc foo args { ... ... bar $var1 } Or I could do (see explicit example): proc foo args { ... ... return...

SAS statistic parameters of specific variables from data with conditions

variables,statistics,sas,conditional-statements,proc
I have a variable I created based on a certain data. now in this new data I need to calculate different statistic parameters, but with conditions for example: *median of this new var only for obs that their birth country is not Italy. *mean of a different var only when...

SAS how to get random selection by group randomly split into multiple groups

sql,sas,sample,proc
I have a simple data set of customers (about 40,000k) It looks like: customerid, group, other_variable a,blue,y b,blue,x c,blue,z d,green,y e,green,d f,green,r g,green,e I want to randomly select for each group, Y amounts of customers (along with their other variable(s). The catch is, i want to have two random selections...

linux proc size limit problems

c,linux,linux-kernel,proc
I'm trying to write a linux kernel module that can dump the contents of other modules to a /proc file (for analysis). In principle it works but it seems I run into some buffer limit or the like. I'm still rather new to Linux kernel development so I would also...

Estimating the multiple input in PROC MIXED

sas,proc,mixed-mode
I'm looking for something that similar to Proc score (result from proc reg) for estimating the data set. So far I have something like this. PROC MIXED data = maindata noclprint covtest; Class ID; Weight w1; Model TIME = Age Age*Age / Solution cl residual; Random Intercept Age Age*Age /...

How can I call a PRO*C program directly from PL/SQL?

sql,c,oracle,proc
I coun't find a similar question here. I have a PRO*C program named pro_c.pc. How can I call and execute this in a piece of PL/SQL code?! Could someone give me a simple example?! Thanks you!...

Is length of rowid in Oracle 11g fixed?

c,database,oracle,oracle11g,proc
Is it possible to configure Oracle 11g installation so that it has more than 18 characters length? Investigating possible cause of locally un-producible bug that might have been caused if customer configured rowid to have more than 18 characters. The table doesn't have an index. Using rowid to delete given...

Map multidimensional array with join as proc

ruby,proc
can I pass argument, to symbol passed to map method ? Code: [["a", "airway", "sarsaparilas"], ["a", "sarsaparilas", "airway"]].map!(&:join) Results in: ["aairwaysarsaparilas", "asarsaparilasairway"] Result I'm interested in: ["a airway sarsaparilas", "a sarsaparilas airway"] I know how to use those methods separately, but this time I'm interested in symbol solution :)...

control the number of decimal places in SAS proc means

sas,decimal,proc
I am trying to report my proc means output with 10 decimal places by specifying maxdec=10. However, SAS does not report more than 7 decimal places. Here is the warning I get: WARNING: NDec value is inappropriate, BEST format will be used. I appreciate any suggestion.

Purpose of & (ampersand) in Ruby for procs and calling methods

ruby,proc
I've noticed that a lot of examples dealing with Ruby Procs have the following & symbol in it. # Ruby Example shout = Proc.new { puts 'Yolo!' } def shout_n_times(n, &callback) n.times do callback.call end end shout_n_times(3, &shout) # prints 'Yolo!' 3 times My question is what is the functional...

How does the proc/diskstats work to present that values? And for proc/stat and meminfo?

linux,unix,statistics,monitoring,proc
I am trying to get the diskstats data by same way that the file does. Is there any way to reach that values without reading that file? How the values are placed there? Is there any ".c" file that processes the data to place on diskstats? And for proc/stat and...

ORA-00904: “E_MAIL”: invalid identifier

c++,oracle,model-view-controller,proc
I am using MVC architecture.I am trying to update a record in a table taking customer id as input. all the data is taken as input in my viewcustomer.cpp class whose method is returning an object of type customer which is passed to a function in modelcustomer.pc via controlcustomer.cpp(controller) Following...

Adding two numbers in base 10 on Assembler

algorithm,assembly,add,8086,proc
How can I add 2 numbers that their value is on base 16 and make the result on "base 10" on assembler. For example: "5h+5h=10h" - I know it's wrong, I just want it to be visually 10h And not: 5h+5h=Ah CODE: MOV AX,5h MOV BX,5h ADD AX,BX result: ax=Ah...

What's wrong with this code in Proc sql in SAS

sql,sas,proc
I've tried to run the following code but it gave me an error message. Please see the following. %macro bktest(prod=); proc sql; create table &prod._pd_coh_seg as select distinct ASOF_YYYYMM, segment, mean(rcpa_b2_pd_low), mean(rcpa_b2_pd_high), sum(rcpa_weight) as Count, sum(annual_default_occurrence*rcpa_weight)/sum(rcpa_weight) as dr_ct, sum(dp_pit*rcpa_weight)/sum(rcpa_weight) as pd_ct_pit, sum(RCPA_B2_PD_TTC_SEG_FCTR*rcpa_weight)/sum(rcpa_weight) as pd_ct_ttc from backtest.&prod._final group by segment; quit;...