Temp Variable in BPC NW

Hello
I was trying to find the post in SDN on use of temp variable in BPC NW 7.0 however i could not find any thing. In all posts no one is using temp variables.
Can we declare temp variable in script logic like we used to do in BPC MS with   # sign ?
or we have to always define memeber in dimension before we can use that in logic ?
All help will be appreciated
Thanks in Advance
Regards
RS
Edited by: rinku singh on Apr 7, 2010 8:23 PM

Hello,
In BPC NW 7.0 (SP02), I just want to know if we can declare and use local variable in a script logic.
For exemple, the user enter a year in a data manager package (with a prompt). For exemple year = 2011.
Then I want to execute calculations for this Year and the previous year (so 2011 et 2010).
I have already tried to use variable with # or % (like in *select instruction) but the result was not OK.
Thanks for your Help.
Best Regards,
A. Portal.

Similar Messages

  • AT NEW/AT END performance versus using temp variables.

    What would be more efficient?  Imagine you are looping through a table that contains sales information for many sales documents/sales groups/sales offices.  I need an AT  statement for each.  The amount of data that this report is HUGE so any performance would be noticed. 
    So, which would perform better?  Using some if statements along with temp variables or the AT statements?
    Regards,
    Davis

    You can use Control break statements.
    make sure you sorted the Table with the fields you are going to perform control breaks.
    and also those fields should be in the beginning or the fields changes should not controlled by any other fields.
    you need to use one extra work area to avoid '*' may be some cases you want some data from the work area.
    loop at itab.
    wa = itab.
    at new field.
    "here some fields which are next to control break fields will appear stars
    "so use work area here
    endat.
    endloop.

  • Import Script with Temp Variable at Bottom of Load File - No Results

    I am running into an issue while trying to load an entity's financials using a Data Pump script to assign a temporary value for the entity number, which is located at the bottom of the report.  Here is how the import file is layed out:
    Account                Description                  Final Balance                                    
    All Accounts and information....
    Entidad: 93          A: 93
    I am trying to pull the 93 into PvarTemp1.  Is there something I need to do special in the scripting since the variable I am trying to extract is at the bottom of the data?  All examples I have been able to find on the forms show the temp variable at the top of the data that the temp vaiable is being applied.  I am very new to VB and would appreicate any help.
    Here are the scripts that I am running:
    GET:
    If Mid(strRecord, 23, 8) = "Entidad:" Then
    RES.PvarTemp1 = Mid(strRecord, 32, 2)
    End If
    GetMexicoEntity = strField
    End Function
    PUT:
    PutMexicoEntity = RES.PvarTemp1
    End Function
    Thanks in advance!

                                                               Saldo Inicial     Activ Período        Balance Final
    Cuenta                 Descripción                          06/01/13                                 06/30/13       Ajuste Balance
    12012                  PTU DIFERIDO                              -489.00                  .00              -489.00
    12018                  IETU DIFERIDO                          -13,100.00                  .00           -13,100.00
    13520                  CREDITO MERCANTIL                   13,682,407.05                  .00        13,682,407.05
    20819                  OTRAS RESERVAS                         445,751.35            86,957.38           532,708.73
    21402                  PASIVO NETO PROYECTADO                   4,887.65                  .00             4,887.65
    30101                  CAPITAL SOCIAL HISTORICO                25,791.04                  .00            25,791.04
    30151                  CAPITAL SOC. ACTUALIZADO                87,406.99                  .00            87,406.99
    30201                  RVA. LEGAL HISTORICO                  -210,712.72                  .00          -210,712.72
    30301                  UTIL/(PERD) AC. HISTORIC            -2,605,881.57                  .00        -2,605,881.57
    30501                  RESUL. ACUM. HIST.                 -10,969,131.88                  .00       -10,969,131.88
    30502                  OCI                                    -22,567.00                  .00           -22,567.00
    30721                  POSICION MONETARIA                     233,964.17                  .00           233,964.17
    30801                  CXREEXP.TRASP. DEL EJERC             1,164,673.76                  .00         1,164,673.76
    77403                  OTROS                                 -445,751.35           -86,957.38          -532,708.73
                                                                 1,377,248.49                  .00         1,377,248.49
                                                         ==================== ==================== ====================
    Criterio del Reporte:                   Reporte pedido por:        iochoa
                          Entidad: 93          A: 93
                   Fecha Efectiva: 06/01/13
                                A: 06/30/13
                 Sumar Subcuentas: S
              Sumar Centros Costo: N
                           Moneda: MN
             Suprimir Montos Cero: S
      Redondeo al Millar más Cerc: No
      Redondeo a Unid más Cercana: No
                  Moneda Reportes:                               Salida: Bal93
                                                               ID Batch:

  • Sql query from plsql type or temp variable

    Hi,
    I have no rights to create or drop table in the production
    But I want to see the data after processing this is multi record data which may need to store in the table or plsql type
    variable.
    What should I do In this case ?
    For ex. I will pass My name in a function it will show each character in rows and how many time that character is repeated and what is the position.
    name 'SUBHASISH'
    S 3 1,6,8
    H 2 4,9
    please suggest.. thanks in adv...

    Hi,
    you can do:
    with word as(select 'SUBHASISH' w from dual),
    occ as(select w,substr(w,rownum,1) s,length(w)-length(replace(w,substr(w,rownum,1),'')) occurences,rownum ord from word
    connect by rownum<=length(w)),
    res as(
    select ord,w,s,occurences,instr(w,s,1,row_number() over(partition by s order by s)) p  from occ c
    connect by prior occurences=occurences-1 and prior s=s
    select s ch,occurences cnt, LTRIM(MAX(SYS_CONNECT_BY_PATH(p,','))  KEEP (DENSE_RANK LAST ORDER BY curr),',') AS pos
    FROM   (SELECT w,
                   s||' '||occurences what,
                   p,
                   s,
                   occurences,
                   ord,
                   ROW_NUMBER() OVER (PARTITION BY s ORDER BY occurences) AS curr,
                   ROW_NUMBER() OVER (PARTITION BY s ORDER BY occurences) -1 AS prev
            FROM   res)
    GROUP BY  s,occurences
    CONNECT BY prev = PRIOR curr AND s = PRIOR s
    START WITH curr = 1
    CH     CNT     POS
    A     1     5
    B     1     3
    H     2     4,9
    I     1     7
    S     3     1,6,8
    U     1     2Edited by: user11268895 on Aug 27, 2010 9:58 AM

  • Error with sequence containers and global temp variables

    I have a process which does the following -
    1. Inside a sequence container an execute sql task has a stored proc which inserts result set into a global temp table.
    2. DFT after the execute sql uses that global temp as a source and the final destinatoion is a oledb destination.
    I have done the following also -
    1. Set the connection manager property RetainSameConnection  = true
    2. Delay validation of dft to true
    3. Validatexternalmetadata of source inside dft to false.
    The first task inside the sequence container works fine(execute sql task),but it fails in the dft with errors as -
    [DST xyz[576]] Error: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80040E37.
    An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 10.0"  Hresult: 0x80040E37  Description: "Invalid object name 'abcd'.".
    [DST xyz[576]] Error: Failed to open a fastload rowset for "[abcd]". Check that the object exists in the database.
    [SSIS.Pipeline] Error: component "DST xyz" (576) failed the pre-execute phase and returned error code 0xC0202040.Could anyone guide me with what i am doing wrong or ignorinf some property.Thanks

    Hi app087,
    Based on your description, I create a sample package in my environment, and I can reproduce the issue. The following steps are for your references:
    Create a stored procedure with the query below in my environment:
    create procedure PTitles
    as
    DROP TABLE ##T123;
    select * INTO ##T123 from [table];
    Drag a Execute SQL Task and a Data Flow Task to a Sequence Container.
    In the Execute SQL Task, select the database of [table] table as the Connection and type the query below as SQLStatement:
    EXEC PTitles
    In the Data Flow Task, select servername.tempdb as the connection manager for the OLE DB Source.
    Map columns correctly in OLE DB Destination.
    Execute the Execute SQL Task at the first time, it works fine. Then execute the Data Flow Task, it fails. Then execute the Execute SQL Task again, it also fails with the error below:
    Execute SQL Task: Executing the query "EXEC PTitles" failed with the following error: "Cannot drop the table '##T123', because it does not exist or you do not have permission.".
    Please execute the Execute SQL Task again to check whether your issue is the same scenario. As per my understanding, it seems that the query “EXEC PTitles” in Execute SQL Task doesn’t create the global temp table ##T123. To fix this issue, I modify the stored
    procedure to like below, then the package can works very well.
    ALTER procedure PTitles
    as
    IF OBJECT_ID('TEMPDB.DBO.##T123') IS NULL
    SELECT * INTO ##T123 FROM [table];
    TRUNCATE TABLE ##t123;
    INSERT INTO ##T123 select * from [table];
    Besides, as you finally did, we can modify the stored procedure as below, then directly use single Data Flow task that with the “EXEC PTitles” as SQL Command query in Source, then load the data to destination table to simplify the package.
    ALTER procedure PTitles
    as
    SELECT * FROM [table];
    If there are any other questions, please post the stored procedure you are using.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • How to pass Temp variable value instead of Table name in From clause.

    Hi,
    I have an requirement to pass the Temperorary variable value instead of Table name in FROM Clause in SQL.
    But I am strugglint to pass this variable value.
    E.g., a Varchar2(5) := 'aa';
    Select * from a;
    Here I come to mention a - 'aa'. But the SQL looks for 'a' as Table. But its should look into 'aa' as Table name.
    Kindly guide me.
    Thanks.

    SQL> declare
      a     varchar2 (5) := 'emp';
      v     varchar2 (100);
      cur   sys_refcursor;
    begin
      open cur for 'Select ename from ' || a;
      fetch cur into v;
      while cur%found
      loop
        dbms_output.put_line (v);
        fetch cur into v;
      end loop;
      close cur;
    end;
    JAMES
    SCOTT
    SMITH
    ALLEN
    WARD
    JONES
    MARTIN
    BLAKE
    CLARK
    KING
    TURNER
    ADAMS
    FORD
    MILLER
    PL/SQL procedure successfully completed.

  • CONVERSION OF 1 TABLE TO ACCOMODATE MORE FIELDS USING TEMP VARIABLE IN STORE PROC

    USE [FacetsXR]
    GO
    IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[frdmrpt].[pr_pha_BiometricsSummary]') AND type in (N'P', N'PC'))
    DROP PROCEDURE [frdmrpt].[pr_pha_BiometricsSummary]
    GO
    CREATE PROCEDURE [frdmrpt].[pr_pha_BiometricsSummary]
    AS
    BEGIN
    DECLARE @partcTot int
    select @partcTot = [frdmrpt].[fn_pha_total_participants](default);
    DECLARE @TEMPTAB TABLE
    SortOrder varchar(10),
    BIMEASURE VARCHAR(30) NULL,
    RC VARCHAR(100) NULL,
    N VARCHAR(5) NULL,
    PSP VARCHAR(10) NULL,
    AVL VARCHAR(10) NULL
    -- HEADER ROW
    --INSERT @TEMPTAB VALUES('00','Biometric Measure','Risk Citeria','N','Percent Of Screened Population','Average Value')
    --BMI
    declare @BMI int
    select @BMI = count(*)
    FROM [frdmrpt].[wt_rpt_pha_pw_HRADetail2] hra
    INNER JOIN [frdmrpt].[wt_rpt_pha_pw_Member] mems
    ON hra.UserID = mems.UserID
    WHERE hra.BMI is not null and hra.BMI != 0.0
    declare @BMIavg float
    select @BMIavg = cast(isnull(AVG(BMI),0.0) as decimal (5,1))
    FROM [frdmrpt].[wt_rpt_pha_pw_HRADetail2] hra
    INNER JOIN [frdmrpt].[wt_rpt_pha_pw_Member] mems
    ON hra.UserID = mems.UserID
    WHERE hra.BMI is not null
    INSERT @TEMPTAB VALUES('100','BMI','.',@BMI,'.',@BMIavg)
    INSERT @TEMPTAB
    SELECT SortOrder,RiskCriteria, BS.Risk_Criteria,COUNT(*) Total,CAST((CAST(([frdmrpt].[fn_pha_percent](COUNT(*), @BMI)) AS VARCHAR(100))) AS VARCHAR(100))+'%'
    FROM
    SELECT
    CASE
    WHEN (BMI > 0 AND BMI <= 17.4) THEN '101'
    WHEN BMI BETWEEN 17.5 AND 18.4 THEN '102'
    WHEN BMI BETWEEN 18.5 AND 24.9 THEN '103'
    WHEN BMI BETWEEN 25.0 AND 29.9 THEN '104'
    WHEN BMI >=30.0 THEN '105'
    END AS SortOrder,
    CASE
    WHEN (BMI > 0 AND BMI <= 17.4) THEN 'Very Underweight'
    WHEN BMI BETWEEN 17.5 AND 18.4 THEN 'Underweight'
    WHEN BMI BETWEEN 18.5 AND 24.9 THEN 'Normal'
    WHEN BMI BETWEEN 25.0 AND 29.9 THEN 'Overweight'
    WHEN BMI >=30.0 THEN 'Obese'
    END AS RiskCriteria
    FROM [frdmrpt].[wt_rpt_pha_pw_HRADetail2] hra
    INNER JOIN [frdmrpt].[wt_rpt_pha_pw_Member] mems
    ON hra.UserID = mems.UserID
    ) bioSumBI
    INNER JOIN [frdmrpt].[pw_Biometric_Summary] BS
    ON bioSumBI.RiskCriteria = BS.Bimetric_Measure
    AND BS.Bimetric_Category ='BMI'
    WHERE bioSumBI.RiskCriteria is not null
    GROUP BY bioSumBI.SortOrder ,bioSumBI.RiskCriteria,BS.Risk_Criteria,BS.Risk_Higher_Limit
    ORDER BY BS.Risk_Higher_Limit
    IF (Select COUNT(*) from @TEMPTAB where SortOrder ='101') = 0
    INSERT @TEMPTAB VALUES('101','Very Underweight','17.4 and below','0','0%','.')
    IF (Select COUNT(*) from @TEMPTAB where SortOrder ='102') = 0
    INSERT @TEMPTAB VALUES('102','Underweight','17.5 to 18.4','0','0%','.')
    IF (Select COUNT(*) from @TEMPTAB where SortOrder ='103') = 0
    INSERT @TEMPTAB VALUES('103','Normal','18.5 to 24.9','0','0%','.')
    IF (Select COUNT(*) from @TEMPTAB where SortOrder ='104') = 0
    INSERT @TEMPTAB VALUES('104','Overweight','25 to 29.9','0','0%','.')
    IF (Select COUNT(*) from @TEMPTAB where SortOrder ='105') = 0
    INSERT @TEMPTAB VALUES('105','Obese','30.0 and above','0','0%','.')
    --BP
    declare @BP INT
    select @BP = count(*)
    FROM [frdmrpt].[wt_rpt_pha_pw_HRADetail2] hra
    INNER JOIN [frdmrpt].[wt_rpt_pha_pw_Member] mems
    ON hra.UserID = mems.UserID
    WHERE hra.Systolic IS NOT NULL AND hra.Diastolic IS NOT NULL
    declare @BPAVG VARCHAR(15)
    select @BPAVG = isnull(CONVERT(VARCHAR(15),AVG(Systolic)) + '/' + CONVERT(VARCHAR(5),AVG(Diastolic)),0)
    FROM [frdmrpt].[wt_rpt_pha_pw_HRADetail2] hra
    INNER JOIN [frdmrpt].[wt_rpt_pha_pw_Member] mems
    ON hra.UserID = mems.UserID
    WHERE hra.Systolic IS NOT NULL AND hra.Diastolic IS NOT NULL
    INSERT @TEMPTAB VALUES('200','Blood Pressure (mmHg)','.',@BP,'.',@BPAVG)
    INSERT @TEMPTAB
    SELECT SortOrder ,RiskCriteria, BS.Risk_Criteria,COUNT(*) Total,
    CAST(([frdmrpt].[fn_pha_percent](COUNT(*), @BP)) AS VARCHAR(100))+'%','.'
    FROM
    SELECT
    CASE
    WHEN (Systolic <=119 and Diastolic <=79) THEN 201
    WHEN not (Systolic >= 140 OR Diastolic >=90) and not (Systolic <=119 and Diastolic <=79) THEN 202 -- basically not high and not low
    WHEN (Systolic >= 140 OR Diastolic >=90) THEN 203
    --WHEN hra.Systolic <=119 OR hra.Diastolic <=79 THEN '201'
    --WHEN (hra.Systolic between 120 AND 139) OR (hra.Diastolic between 80 AND 89) THEN '202'
    --WHEN (hra.Systolic between 140 AND 159) OR (hra.Diastolic between 90 AND 99) THEN '203'
    --WHEN hra.Systolic >= 160 OR hra.Diastolic >= 100 THEN '204'
    END AS SortOrder,
    CASE
    WHEN (Systolic <=119 and Diastolic <=79) THEN 'Low Risk'
    WHEN not (Systolic >= 140 OR Diastolic >=90) and not (Systolic <=119 and Diastolic <=79) THEN 'Moderate Risk'
    WHEN (Systolic >= 140 OR Diastolic >=90) THEN 'High Risk'
    --WHEN hra.Systolic <=119 OR hra.Diastolic <=79 THEN 'Low Risk'
    --WHEN (hra.Systolic between 120 AND 139) OR (hra.Diastolic between 80 AND 89) THEN 'Prehypertension'
    --WHEN (hra.Systolic between 140 AND 159) OR (hra.Diastolic between 90 AND 99) THEN 'Stage I hypertension'
    --WHEN hra.Systolic >= 160 OR hra.Diastolic >= 100 THEN 'Stage II hypertension'
    END AS RiskCriteria
    FROM [frdmrpt].[wt_rpt_pha_pw_HRADetail2] hra
    INNER JOIN [frdmrpt].[wt_rpt_pha_pw_Member] mems
    ON hra.UserID = mems.UserID
    ) bioSumBP
    INNER JOIN [frdmrpt].[pw_Biometric_Summary] BS
    ON bioSumBP.RiskCriteria = BS.Bimetric_Measure
    AND BS.Bimetric_Category ='Blood Pressure (mmHg)'
    WHERE bioSumBP.RiskCriteria is not null
    GROUP BY bioSumBP.SortOrder ,bioSumBP.RiskCriteria,BS.Risk_Criteria,BS.Risk_Higher_Limit
    --ORDER BY BS.Risk_Higher_Limit desc
    IF (Select COUNT(*) from @TEMPTAB where SortOrder ='201') = 0
    INSERT @TEMPTAB VALUES('201','Low Risk','Systolic: 119 and below Diastolic: 79 and below','0','0%','.')
    IF (Select COUNT(*) from @TEMPTAB where SortOrder ='202') = 0
    INSERT @TEMPTAB VALUES('202','Moderate Risk','Systolic: 120 to 139 Diastolic: 80 to 89','0','0%','.')
    IF (Select COUNT(*) from @TEMPTAB where SortOrder ='203') = 0
    INSERT @TEMPTAB VALUES('203','High Risk','Systolic: 140 and above Diastolic: 90 and above','0','0%','.')
    --Cholestrol
    declare @TC int
    select @TC = count(*)
    FROM [frdmrpt].[wt_rpt_pha_pw_HRADetail2] hra
    INNER JOIN [frdmrpt].[wt_rpt_pha_pw_Member] mems
    ON hra.UserID = mems.UserID
    WHERE hra.TotalCholesterol IS NOT NULL
    declare @TCAVG FLOAT
    select @TCAVG = isnull(ROUND(AVG(TotalCholesterol),0),0)
    FROM [frdmrpt].[wt_rpt_pha_pw_HRADetail2] hra
    INNER JOIN [frdmrpt].[wt_rpt_pha_pw_Member] mems
    ON hra.UserID = mems.UserID
    WHERE hra.TotalCholesterol IS NOT NULL
    INSERT @TEMPTAB VALUES('300','Total Cholesterol (mg/dL)','.',@TC,'.',@TCAVG)
    INSERT @TEMPTAB
    SELECT SortOrder ,RiskCriteria, BS.Risk_Criteria,COUNT(*) Total,
    CAST(([frdmrpt].[fn_pha_percent](COUNT(*), @TC)) AS VARCHAR(100))+'%','.'
    FROM
    SELECT
    CASE
    WHEN hra.TotalCholesterol <= 199 THEN '301'
    WHEN hra.TotalCholesterol between 200 and 239 THEN '302'
    WHEN hra.TotalCholesterol >=240 THEN '303'
    END AS SortOrder,
    CASE
    WHEN hra.TotalCholesterol <= 199 THEN 'Low Risk'
    WHEN hra.TotalCholesterol between 200 and 239 THEN 'Moderate Risk'
    WHEN hra.TotalCholesterol >=240 THEN 'High Risk'
    END AS RiskCriteria
    FROM [frdmrpt].[wt_rpt_pha_pw_HRADetail2] hra
    INNER JOIN [frdmrpt].[wt_rpt_pha_pw_Member] mems
    ON hra.UserID = mems.UserID
    ) bioSumHDL
    INNER JOIN [frdmrpt].[pw_Biometric_Summary] BS
    ON bioSumHDL.RiskCriteria = BS.Bimetric_Measure
    AND BS.Bimetric_Category ='Total Cholesterol (mg/dL)'
    WHERE bioSumHDL.RiskCriteria is not null
    GROUP BY bioSumHDL.SortOrder ,bioSumHDL.RiskCriteria,BS.Risk_Criteria,BS.Risk_Higher_Limit
    ORDER BY BS.Risk_Higher_Limit
    IF (Select COUNT(*) from @TEMPTAB where SortOrder ='301') = 0
    INSERT @TEMPTAB VALUES('301','Low Risk','199 and below','0','0%','.')
    IF (Select COUNT(*) from @TEMPTAB where SortOrder ='302') = 0
    INSERT @TEMPTAB VALUES('302','Moderate Risk','200 to 239','0','0%','.')
    IF (Select COUNT(*) from @TEMPTAB where SortOrder ='303') = 0
    INSERT @TEMPTAB VALUES('303','High Risk','240 and above','0','0%','.')
    --HDL
    declare @HDL int
    select @HDL = count(*)
    FROM [frdmrpt].[wt_rpt_pha_pw_HRADetail2] hra
    INNER JOIN [frdmrpt].[wt_rpt_pha_pw_Member] mems
    ON hra.UserID = mems.UserID
    WHERE HDL IS NOT NULL
    declare @HDLAVG FLOAT
    select @HDLAVG = isnull(ROUND(AVG(HDL),0),0)
    FROM [frdmrpt].[wt_rpt_pha_pw_HRADetail2] hra
    INNER JOIN [frdmrpt].[wt_rpt_pha_pw_Member] mems
    ON hra.UserID = mems.UserID
    WHERE HDL IS NOT NULL
    INSERT @TEMPTAB VALUES('400','HDL (mg/dL)','.',@HDL,'.',@HDLAVG)
    INSERT @TEMPTAB
    SELECT SortOrder ,RiskCriteria, BS.Risk_Criteria,COUNT(*) Total,
    CAST(([frdmrpt].[fn_pha_percent](COUNT(*), @HDL)) AS VARCHAR(100))+'%','.'
    FROM
    SELECT
    CASE
    WHEN hra.HDL >= 60 THEN '401'--'Desirable'
    WHEN hra.HDL between 40 and 59 THEN '402' --'Borderline Risk'
    WHEN hra.HDL <=39 THEN '403' --'Undesirable Risk'
    END AS SortOrder,
    CASE
    WHEN hra.HDL >= 60 THEN 'Low Risk'--'Desirable'
    WHEN hra.HDL between 40 and 59 THEN 'Moderate Risk' --'Borderline Risk'
    WHEN hra.HDL <=39 THEN 'High Risk' --'Undesirable Risk'
    END AS RiskCriteria
    FROM [frdmrpt].[wt_rpt_pha_pw_HRADetail2] hra
    INNER JOIN [frdmrpt].[wt_rpt_pha_pw_Member] mems
    ON hra.UserID = mems.UserID
    ) bioSumHDL
    INNER JOIN [frdmrpt].[pw_Biometric_Summary] BS
    ON bioSumHDL.RiskCriteria = BS.Bimetric_Measure
    AND BS.Bimetric_Category ='HDL (mg/dL)'
    WHERE bioSumHDL.RiskCriteria is not null
    GROUP BY bioSumHDL.SortOrder ,bioSumHDL.RiskCriteria,BS.Risk_Criteria,BS.Risk_Higher_Limit
    ORDER BY BS.Risk_Higher_Limit desc
    IF (Select COUNT(*) from @TEMPTAB where SortOrder ='401') = 0
    INSERT @TEMPTAB VALUES('401','Low Risk','60 and above','0','0%','.')
    IF (Select COUNT(*) from @TEMPTAB where SortOrder ='402') = 0
    INSERT @TEMPTAB VALUES('402','Moderate Risk','40 to 59','0','0%','.')
    IF (Select COUNT(*) from @TEMPTAB where SortOrder ='403') = 0
    INSERT @TEMPTAB VALUES('403','High Risk','39 and below','0','0%','.')
    --LDL
    declare @LDL DECIMAL
    select @LDL = count(*)
    FROM [frdmrpt].[wt_rpt_pha_pw_HRADetail2] hra
    INNER JOIN [frdmrpt].[wt_rpt_pha_pw_Member] mems
    ON hra.UserID = mems.UserID
    WHERE hra.LDL IS NOT NULL
    declare @LDLAVG FLOAT
    select @LDLAVG = isnull(ROUND(AVG(LDL),0),0)
    FROM [frdmrpt].[wt_rpt_pha_pw_HRADetail2] hra
    INNER JOIN [frdmrpt].[wt_rpt_pha_pw_Member] mems
    ON hra.UserID = mems.UserID
    WHERE hra.LDL IS NOT NULL
    INSERT @TEMPTAB VALUES('500','LDL (mg/dL)','.',@LDL,'.',@LDLAVG)
    INSERT @TEMPTAB
    SELECT SortOrder ,RiskCriteria, BS.Risk_Criteria,COUNT(*) Total,
    CAST(([frdmrpt].[fn_pha_percent](COUNT(*), @LDL)) AS VARCHAR(100))+'%','.'
    FROM
    SELECT
    CASE
    WHEN hra.LDL <= 129 THEN '501'
    WHEN hra.LDL between 130 and 159 THEN '502' --'Borderline Risk'
    WHEN hra.LDL >=160 THEN '503' --'Undesirable Risk'
    END AS SortOrder,
    CASE
    WHEN hra.LDL <= 129 THEN 'Low Risk'--'Desirable'
    WHEN hra.LDL between 130 and 159 THEN 'Moderate Risk' --'Borderline Risk'
    WHEN hra.LDL >=160 THEN 'High Risk' --'Undesirable Risk'
    END AS RiskCriteria
    FROM [frdmrpt].[wt_rpt_pha_pw_HRADetail2] hra
    INNER JOIN [frdmrpt].[wt_rpt_pha_pw_Member] mems
    ON hra.UserID = mems.UserID
    ) bioSumHDL
    INNER JOIN [frdmrpt].[pw_Biometric_Summary] BS
    ON bioSumHDL.RiskCriteria = BS.Bimetric_Measure
    AND BS.Bimetric_Category ='LDL (mg/dL)'
    WHERE bioSumHDL.RiskCriteria is not null
    GROUP BY bioSumHDL.SortOrder ,bioSumHDL.RiskCriteria,BS.Risk_Criteria,BS.Risk_Higher_Limit
    ORDER BY BS.Risk_Higher_Limit
    IF (Select COUNT(*) from @TEMPTAB where SortOrder ='501') = 0
    INSERT @TEMPTAB VALUES('501','Low Risk','129 and below','0','0%','.')
    IF (Select COUNT(*) from @TEMPTAB where SortOrder ='502') = 0
    INSERT @TEMPTAB VALUES('502','Moderate Risk','130 to 159','0','0%','.')
    IF (Select COUNT(*) from @TEMPTAB where SortOrder ='503') = 0
    INSERT @TEMPTAB VALUES('503','High Risk','160 and above','0','0%','.')
    --Blood Glucose (mg/dL)
    declare @BG int
    select @BG = count(*)
    FROM [frdmrpt].[wt_rpt_pha_pw_HRADetail2] hra
    INNER JOIN [frdmrpt].[wt_rpt_pha_pw_Member] mems
    ON hra.UserID = mems.UserID
    WHERE hra.BloodGlucose IS NOT NULL
    declare @BGAVG FLOAT
    select @BGAVG = ROUND(AVG(BloodGlucose),0)
    FROM [frdmrpt].[wt_rpt_pha_pw_HRADetail2] hra
    INNER JOIN [frdmrpt].[wt_rpt_pha_pw_Member] mems
    ON hra.UserID = mems.UserID
    WHERE hra.BloodGlucose IS NOT NULL
    INSERT @TEMPTAB VALUES('600','Blood Glucose (mg/dL)','.',@BG,'.','NA' )--@BGAVG)
    INSERT @TEMPTAB
    PRESENT CODE FOR ATTACHED TABLE SELECT SortOrder ,RiskCriteria, BS.Risk_Criteria, Total,
    CAST(([frdmrpt].[fn_pha_percent](Total, @BG)) AS VARCHAR(100))+'%','.'
    FROM
    SELECT
    CASE
    WHEN (r.RiskLevel='LOW') THEN '601'
    WHEN (r.RiskLevel='MODERATE') THEN '602'
    WHEN (r.RiskLevel='HIGH') THEN '603'
    END AS SortOrder,
    CASE
    WHEN (r.RiskLevel='LOW') THEN 'Low Risk'
    WHEN (r.RiskLevel='MODERATE') THEN 'Moderate Risk'
    WHEN (r.RiskLevel='HIGH') THEN 'High Risk'
    END AS RiskCriteria,
    CASE
    WHEN (r.RiskLevel='LOW') THEN cast(COUNT(*)AS VARCHAR(100))
    WHEN (r.RiskLevel='MODERATE') THEN cast(COUNT(*)AS VARCHAR(100))
    WHEN (r.RiskLevel='HIGH') THEN cast(COUNT(*)AS VARCHAR(100))
    END AS Total
    From [frdmrpt].[wt_rpt_pha_pw_UserHealthRisks] r
    join [frdmrpt].[wt_rpt_pha_pw_Member] m on m.UserID = r.UserID
    join [frdmrpt].[wt_rpt_pha_pw_HRADetail2] d on d.UserID = m.UserID
    where r.RiskStringID = 'BLOODGLUCOSE'
    group by GROUPING sets ( r.RiskLevel, () )
    ) bioSumHDL
    INNER JOIN [frdmrpt].[pw_Biometric_Summary] BS
    ON bioSumHDL.RiskCriteria = BS.Bimetric_Measure
    AND BS.Bimetric_Category ='Blood Glucose (mg/dL)'
    WHERE bioSumHDL.RiskCriteria is not null
    GROUP BY bioSumHDL.SortOrder ,bioSumHDL.Total,bioSumHDL.RiskCriteria,BS.Risk_Criteria,BS.Risk_Higher_Limit
    ORDER BY BS.Risk_Higher_Limit
    IF (Select COUNT(*) from @TEMPTAB where SortOrder ='601') = 0
    INSERT @TEMPTAB VALUES('601','Low Risk','Fasting: 70 to 99 Random: 80 to 139','0','0%','.')
    IF (Select COUNT(*) from @TEMPTAB where SortOrder ='602') = 0
    INSERT @TEMPTAB VALUES('602','Moderate Risk','Fasting: 100 to 125 Random: 140 to 199','0','0%','.')
    IF (Select COUNT(*) from @TEMPTAB where SortOrder ='603') = 0
    INSERT @TEMPTAB VALUES('603','High Risk','Fasting: 126 and above Random: 200 and above','0','0%','.')
    --Triglycerides (mg/dL)
    declare @TRG int
    select @TRG = count(*)
    FROM [frdmrpt].[wt_rpt_pha_pw_HRADetail2] hra
    INNER JOIN [frdmrpt].[wt_rpt_pha_pw_Member] mems
    ON hra.UserID = mems.UserID
    WHERE hra.Triglycerides IS NOT NULL
    declare @TRGAVG FLOAT
    select @TRGAVG = isnull(ROUND(AVG(Triglycerides),0),0)
    FROM [frdmrpt].[wt_rpt_pha_pw_HRADetail2] hra
    INNER JOIN [frdmrpt].[wt_rpt_pha_pw_Member] mems
    ON hra.UserID = mems.UserID
    WHERE hra.Triglycerides IS NOT NULL
    INSERT @TEMPTAB VALUES('700','Triglycerides (mg/dL)','.',@TRG,'.',@TRGAVG)
    INSERT @TEMPTAB
    SELECT SortOrder ,RiskCriteria, BS.Risk_Criteria,COUNT(*) Total,
    CAST(([frdmrpt].[fn_pha_percent](COUNT(*), @TRG)) AS VARCHAR(100))+'%','.'
    FROM
    SELECT
    CASE
    WHEN hra.Triglycerides <=149 THEN '701'
    WHEN hra.Triglycerides between 150 and 199 THEN '702'
    WHEN hra.Triglycerides >= 200 THEN '703'
    END AS SortOrder,
    CASE
    WHEN hra.Triglycerides <=149 THEN 'Low Risk'
    WHEN hra.Triglycerides between 150 and 199 THEN 'Moderate Risk'
    WHEN hra.Triglycerides >= 200 THEN 'High Risk'
    END AS RiskCriteria
    FROM [frdmrpt].[wt_rpt_pha_pw_HRADetail2] hra
    INNER JOIN [frdmrpt].[wt_rpt_pha_pw_Member] mems
    ON hra.UserID = mems.UserID
    ) bioSumHDL
    INNER JOIN [frdmrpt].[pw_Biometric_Summary] BS
    ON bioSumHDL.RiskCriteria = BS.Bimetric_Measure
    AND BS.Bimetric_Category ='Triglycerides (mg/dL)'
    WHERE bioSumHDL.RiskCriteria is not null
    GROUP BY bioSumHDL.SortOrder ,bioSumHDL.RiskCriteria,BS.Risk_Criteria,BS.Risk_Higher_Limit
    ORDER BY BS.Risk_Higher_Limit
    IF (Select COUNT(*) from @TEMPTAB where SortOrder ='701') = 0
    INSERT @TEMPTAB VALUES('701','Low Risk','149 and below','0','0%','.')
    IF (Select COUNT(*) from @TEMPTAB where SortOrder ='702') = 0
    INSERT @TEMPTAB VALUES('702','Moderate Risk','150 to 199','0','0%','.')
    IF (Select COUNT(*) from @TEMPTAB where SortOrder ='703') = 0
    INSERT @TEMPTAB VALUES('703','High Risk','200 and above','0','0%','.')
    SELECT BIMEASURE,RC ,N ,PSP ,AVL FROM @TEMPTAB order by SortOrder
    END
    GO
    GRANT EXECUTE ON [frdmrpt].[pr_pha_BiometricsSummary] to FRDM_END_USER_ROLE
    GO

    work done so far(I will aprreciate your input and suggestions to complete this.Thanks
    CREATE PROCEDURE [frdmrpt].[pr_pha_T1T2_BiometricsSummaryTest]
    AS
    BEGIN
    DECLARE @partcTot int
    select @partcTot = [frdmrpt].[fn_pha_total_participants](default);
    DECLARE @TEMPTAB TABLE
    SortOrder varchar(10),
    BIMEASURE VARCHAR(30) NULL,
    RC VARCHAR(100) NULL,
    N_T1 VARCHAR(5) NULL,
    PSP_T1 VARCHAR(10) NULL,
    AVL_T1 VARCHAR(10) NULL,
    N_T2 VARCHAR(5) NULL,
    PSP_T2 VARCHAR(10) NULL,
    AVL_T2 VARCHAR(10) NULL
    -- HEADER ROW
    --INSERT @TEMPTAB VALUES('00','Biometric Measure','Risk Citeria','N','Percent Of Screened Population','Average Value')
    --BMI
    --declare @BMI int
    --select @BMI = count(*)
    ---FROM [frdmrpt].[wt_rpt_pha_pw_HRADetail2] hra
    ---INNER JOIN [frdmrpt].[wt_rpt_pha_pw_Member] mems
    ---ON hra.UserID = mems.UserID
    --WHERE hra.BMI is not null and hra.BMI != 0.0
    declare @BMI_T1 int
    select @BMI_T1 = count(*)
    FROM [frdmrpt].wt_pha_T1T2_HRADetail2 hra
    INNER JOIN [frdmrpt].wt_pha_T1T2_Member mems
    ON hra.UserID = mems.UserID and hra.T1T2=mems.T1T2
    WHERE hra.BMI is not null and hra.BMI <> 0.0 and mems.T1T2 = 'T1'
    --SELECT @BMI_T1
    declare @BMI_T2 int
    select @BMI_T2 = count(*)
    FROM [frdmrpt].wt_pha_T1T2_HRADetail2 hra
    INNER JOIN [frdmrpt].wt_pha_T1T2_Member mems
    ON hra.UserID = mems.UserID and hra.T1T2=mems.T1T2
    WHERE hra.BMI is not null and hra.BMI <> 0.0 and mems.T1T2 = 'T2'
    ---SELECT @BMI_T2
    declare @BMIavg_T1 float
    select @BMIavg_T1 = cast(isnull(AVG(BMI),0.0) as decimal (5,1))
    FROM [frdmrpt].wt_pha_T1T2_HRADetail2 hra
    INNER JOIN [frdmrpt].wt_pha_T1T2_Member mems
    ON hra.UserID = mems.UserID
    WHERE hra.BMI is not null --and hra.BMI <> 0.0
    and mems.T1T2 = 'T1'
    --SELECT @BMIavg_T1

  • Variable switch with no other variables or temps

    I am a first level Java student in college. We have been instructed to write a Java program that promts the user to input three integers to int variables a, b,c and switch them so that a=c b=a and c=b with out using any other variables or temp variables. I know how to do everything except switch the variables without losing one. The only hint that he gave us was that
    x^y^y=x also when we print the variables after rotation we must do it as follows:
    System.out.println("a =" a "b=" b "c=" c);
    I would really appreciate any hints or advise you can give me to help me out with this problem
    again I have only been studying programming for a few weeks so my skills are limited.
    Thank You

    If
    a = 2; (0010) and
    b = 4; (0100) than
    a ^ b = 6 (0110)
    try
    a = a ^ c; //=a ^ c
    b = b ^ c; //=b ^ c
    c = c ^ b; //=b
    b = b ^ a; //=a ^ b
    a = a ^ c ^ b; //=c
    b = b ^ c;
    to solve your problem. Do not know if it is the shortest way, but it works. :)

  • Displaying Customer Exit Variable with derived value from another ODS

    Hi All,
    Sorry if this question has been answered before.  I searched the forums and could not find anything specific to my problem.
    I am new to BEx Query.  Customer is requesting a variable(s) be created which will be displayed as a column along with other CKF and RKF.  This query is a payroll query for US/Canada.  This new variable will be based on the user input date for the query.  We are to take this date and go look up the actual pay date for the pay period to which the user input date belongs.  The pay date is stored in another ODS.
    So far, as far as the changes to the Customer Exit ZXRSRU01 are concerned, I would perform the logic when I_STEP = 2.  Do a basic selection off the second ODS, derive the pay date, and store in range table E_T_Range.
    The data displayed off the user input date is displayed in rows.  This is done six times, going back seven days for each row (first row is data for period user entered date to user entered date - 7 days; second row is data for period user entered date - 7 days to user entered date - 14 days; etc ...).  For this to happen  correctly, I am assuming the variable(s) are to to have characteristic types 'Not ready for input', 'Mandatory', 'Customer Exit', and 'Single Value'.
    My question is ... How do I display the six variables in columns (how are they to be defined in the query) and the characteristics I list above, are they correct? Does this need to be a replacement path variable?
    Thanks.
    Edited by: Amir Hasan on Jun 11, 2009 6:24 PM
    Edited by: Amir Hasan on Jun 11, 2009 6:25 PM

    Hi Amir,
    What i can understand from u r requirement is you want to few columns that will show something like below,
    User entered date = x
    Period of X to Period of (X-7)       Period of X to Period of (X-14).....
    This can be done by CMOD for variable only.
    Logic steps :
    1) Take the user input.
    2) Find out the period by using T009B table and store in temp variable.
    3) Do day -7 and find out period for the same
    4) Assing period of X to ls_range-high range and X-7 to ls_range-low.
    Let me know if you have any doubt
    Regards,
    Viren

  • Assigning a value to a variable

    declare
    -- Local variables here
    v_temp1 number;
    v_temp2 number;
    v_temp3 number;
    v_final number;
    begin
    v_temp1 :=2;
    dbms_output.put_line('v_tmp1:'||v_temp1);
    dbms_output.put_line('v_tmp2:'||v_temp2);
    dbms_output.put_line('v_tmp3:'||v_temp3);
    --i should not do the below
    --v_final :=v_temp1;
    dbms_output.put_line('v_final:'||v_final);
    end;
    declare
    -- Local variables here
    v_temp1 number;
    v_temp2 number;
    v_temp3 number;
    v_final number;
    begin
    v_temp2 :=2;
    dbms_output.put_line('v_tmp1:'||v_temp1);
    dbms_output.put_line('v_tmp2:'||v_temp2);
    dbms_output.put_line('v_tmp3:'||v_temp3);
    --i should not do the below
    --v_final :=v_temp2;
    dbms_output.put_line('v_final:'||v_final);
    end;
    Hi,
    I have some 10 temp variables of which only one variable will have a value and rest will not
    have a value..it can be any temp variable
    I want to assign the temp variable to v_final that means which ever temp has a value that needs to be assigned to v_final, i cannot do this as above which is commented
    In the above example i have give 3 temp variables..
    Can any one please tell me how can i achieve this.
    Regards
    RG

    May help
    declare
    -- Local variables here
    v_temp1 number;
    v_temp2 number;
    v_temp3 number;
    v_final number;
    begin
    v_temp2 :=2;
    dbms_output.put_line('v_tmp1:'||v_temp1);
    dbms_output.put_line('v_tmp2:'||v_temp2);
    dbms_output.put_line('v_tmp3:'||v_temp3);
    v_final := case when v_temp1 is not null then v_temp1 when v_temp_2 is not null then v_temp2 when v-temp3 is not null then v_temp3.......
                      when v_temp10 is not null then v_temp10 end;
    dbms_output.put_line('v_final:'||v_final);
    end;Cheers!!!
    Bhushan

  • How to put variable value inside ora:parseEscapedXML ?

    Hi,
    I am in a situation like I have a variable like temp that has value "runtime value". Now I want to put this temp variable like
    ora:parseEscapedXML('<data><xd:name="a"> <xd:value>temp</dsml:value></xd:name> </data>')
    But it shows temp as a String not its runtime value. I have also used bpws:getVariableData(temp) or bpws:getVariableData("temp") or bpws:getVariableData('temp') but useless .
    Any help ?
    Thanks

    I have pasted my XML into the Expression but its unable to pick the value of variable. When I used/paste the same xml in a XML Fragment its giving me error about literal invalid.
    What should I do now ?
    Thanks

  • Using a xpath expression stored in a variable

    Hi All,
    I have an xpath expression which is stored in the database which I need to use against the request XML. I am able to retrieve this Xpath expression from the database, but not able to use it against the request XML.
    Xpath expression got from the database is: /request/param//name.
    I have tried $body/$XpathVariable, this does not work. I can not hard code this expression during my design time, so the details of the expression has to be fetched at run time.
    Any ideas to get the value would helpful.
    Thanks

    try to assign this value to a temp variable and then in the XqueryExpression try to retrieve it starting with "//"

  • How to get system Environment variable?

    How to get system Environment variable without using jni?
    just like "JAVA_HOME" or "PATH"...
    Any reply is help to me!! :-)

    Thx for your reply...
    I get it!!!
    Read environment variables from an application
    Start the JVM with the "-D" switch to pass properties to the application and read them with the System.getProperty() method. SET myvar=Hello world
    SET myothervar=nothing
    java -Dmyvar="%myvar%" -Dmyothervar="%myothervar%" myClass
    then in myClass String myvar = System.getProperty("myvar");
    String myothervar = System.getProperty("myothervar");
    This is useful when using a JAVA program as a CGI.
    (DOS bat file acting as a CGI) java -DREQUEST_METHOD="%REQUEST_METHOD%"
    -DQUERY_STRING="%QUERY_STRING%"
    javaCGI
    If you don't know in advance, the name of the variable to be passed to the JVM, then there is no 100% Java way to retrieve them.
    NOTE: JDK1.5 provides a way to achieve this, see this HowTo.
    One approach (not the easiest one), is to use a JNI call to fetch the variables, see this HowTo.
    A more low-tech way, is to launch the appropriate call to the operating system and capture the output. The following snippet puts all environment variables in a Properties class and display the value the TEMP variable. import java.io.*;
    import java.util.*;
    public class ReadEnv {
    public static Properties getEnvVars() throws Throwable {
    Process p = null;
    Properties envVars = new Properties();
    Runtime r = Runtime.getRuntime();
    String OS = System.getProperty("os.name").toLowerCase();
    // System.out.println(OS);
    if (OS.indexOf("windows 9") > -1) {
    p = r.exec( "command.com /c set" );
    else if ( (OS.indexOf("nt") > -1)
    || (OS.indexOf("windows 2000") > -1 )
    || (OS.indexOf("windows xp") > -1) ) {
    // thanks to JuanFran for the xp fix!
    p = r.exec( "cmd.exe /c set" );
    else {
    // our last hope, we assume Unix (thanks to H. Ware for the fix)
    p = r.exec( "env" );
    BufferedReader br = new BufferedReader
    ( new InputStreamReader( p.getInputStream() ) );
    String line;
    while( (line = br.readLine()) != null ) {
    int idx = line.indexOf( '=' );
    String key = line.substring( 0, idx );
    String value = line.substring( idx+1 );
    envVars.setProperty( key, value );
    // System.out.println( key + " = " + value );
    return envVars;
    public static void main(String args[]) {
    try {
    Properties p = ReadEnv.getEnvVars();
    System.out.println("the current value of TEMP is : " +
    p.getProperty("TEMP"));
    catch (Throwable e) {
    e.printStackTrace();
    Thanks to W.Rijnders for the W2K fix.
    An update from Van Ly :
    I found that, on Windows 2003 server, the property value for "os.name" is actually "windows 2003." So either that has to be added to the bunch of tests or just relax the comparison strings a bit: else if ( (OS.indexOf("nt") > -1)
    || (OS.indexOf("windows 2000") > -1 )
    || (OS.indexOf("windows 2003") > -1 ) // works but is quite specific to 2003
    || (OS.indexOf("windows xp") > -1) ) {
    else if ( (OS.indexOf("nt") > -1)
    || (OS.indexOf("windows 20") > -1 ) // probably is better since no other OS would return "windows" anyway
    || (OS.indexOf("windows xp") > -1) ) {
    I started with "windows 200" but thought "what the hell" and made it "windows 20" to lengthen its longivity. You could push it further and use "windows 2," I suppose. The only thing to watch out for is to not overlap with "windows 9."
    On Windows, pre-JDK 1.2 JVM has trouble reading the Output stream directly from the SET command, it never returns. Here 2 ways to bypass this behaviour.
    First, instead of calling directly the SET command, we use a BAT file, after the SET command we print a known string. Then, in Java, when we read this known string, we exit from loop. [env.bat]
    @set
    @echo **end
    [java]
    if (OS.indexOf("windows") > -1) {
    p = r.exec( "env.bat" );
    while( (line = br.readLine()) != null ) {
    if (line.indexOf("**end")>-1) break;
    int idx = line.indexOf( '=' );
    String key = line.substring( 0, idx );
    String value = line.substring( idx+1 );
    hash.put( key, value );
    System.out.println( key + " = " + value );
    The other solution is to send the result of the SET command to file and then read the file from Java. ...
    if (OS.indexOf("windows 9") > -1) {
    p = r.exec( "command.com /c set > envvar.txt" );
    else if ( (OS.indexOf("nt") > -1)
    || (OS.indexOf("windows 2000") > -1
    || (OS.indexOf("windows xp") > -1) ) {
    // thanks to JuanFran for the xp fix!
    p = r.exec( "cmd.exe /c set > envvar.txt" );
    // then read back the file
    Properties p = new Properties();
    p.load(new FileInputStream("envvar.txt"));
    Thanks to JP Daviau
    // UNIX
    public Properties getEnvironment() throws java.io.IOException {
    Properties env = new Properties();
    env.load(Runtime.getRuntime().exec("env").getInputStream());
    return env;
    Properties env = getEnvironment();
    String myEnvVar = env.get("MYENV_VAR");
    To read only one variable : // NT version , adaptation for other OS is left as an exercise...
    Process p = Runtime.getRuntime().exec("cmd.exe /c echo %MYVAR%");
    BufferedReader br = new BufferedReader
    ( new InputStreamReader( p.getInputStream() ) );
    String myvar = br.readLine();
    System.out.println(myvar);
    Java's System properties contains some useful informations about the environment, for example, the TEMP and PATH environment variables (on Windows). public class ShowSome {
    public static void main(String args[]){
    System.out.println("TEMP : " + System.getProperty("java.io.tmpdir"));
    System.out.println("PATH : " + System.getProperty("java.library.path"));
    System.out.println("CLASSPATH : " + System.getProperty("java.class.path"));
    System.out.println("SYSTEM DIR : " +
    System.getProperty("user.home")); // ex. c:\windows on Win9x system
    System.out.println("CURRENT DIR: " + System.getProperty("user.dir"));
    Here some tips from H. Ware about the PATH on different OS.
    PATH is not quite the same as library path. In unixes, they are completely different---the libraries typically have their own directories. System.out.println("the current value of PATH is: {" +
    p.getProperty("PATH")+"}");
    System.out.println("LIBPATH: {" +
    System.getProperty("java.library.path")+"}");
    gives the current value of PATH is:
    {/home/hware/bin:/usr/local/bin:/usr/xpg4/bin:/opt/SUNWspro/bin:/usr/ccs/bin:
    /usr/ucb:/bin:/usr/bin:/home/hware/linux-bin:/usr/openwin/bin/:/usr/games/:
    /usr/local/games:/usr/ccs/lib/:/usr/new:/usr/sbin/:/sbin/:/usr/hosts/:
    /usr/openwin/lib:/usr/X11/bin:/usr/bin/X11/:/usr/local/bin/X11:
    /usr/bin/pbmplus:/usr/etc/:/usr/dt/bin/:/usr/lib:/usr/lib/lp/postscript:
    /usr/lib/nis:/usr/share/bin:/usr/share/bin/X11:
    /home/hware/work/cdk/main/cdk/../bin:/home/hware/work/cdk/main/cdk/bin:.}
    LIBPATH:
    {/usr/lib/j2re1.3/lib/i386:/usr/lib/j2re1.3/lib/i386/native_threads:
    /usr/lib/j2re1.3/lib/i386/client:/usr/lib/j2sdk1.3/lib/i386:/usr/lib:/lib}
    on my linux workstation. (java added all those execpt /lib and /usr/lib). But these two lines aren't the same on window either:
    This system is windows nt the current value of PATH is:
    {d:\OrbixWeb3.2\bin;D:\jdk1.3\bin;c:\depot\cdk\main\cdk\bin;c:\depot\
    cdk\main\cdk\..\bin;d:\OrbixWeb3.2\bin;D:\Program
    Files\IBM\GSK\lib;H:\pvcs65\VM\win32\bin;c:\cygnus
    \cygwin-b20\H-i586-cygwin32\bin;d:\cfn\bin;D:\orant\bin;C:\WINNT\system32;C:\WINNT;
    C:\Program Files\Dell\OpenManage\Resolution Assistant\Common\bin;
    d:\Program Files\Symantec\pcAnywhere;
    C:\Program Files\Executive Software\DiskeeperServer\;C:\Program Files\Perforce}
    LIBPATH:
    {D:\jdk1.3\bin;.;C:\WINNT\System32;C:\WINNT;d:\OrbixWeb3.2\bin;D:\jdk1.3\bin;
    c:\depot\cdk\main\cdk\bin;c:\depot\cdk\main\cdk\..\bin;
    d:\OrbixWeb3.2\bin;D:\Program Files\IBM\GSK\lib;
    H:\pvcs65\VM\win32\bin;c:\cygnus\cygwin-b20\H-i586-cygwin32\bin;d:\cfn\bin;
    D:\orant\bin;C:\WINNT\system32;
    C:\WINNT;C:\Program Files\Dell\OpenManage\ResolutionAssistant\Common\bin;
    d:\Program Files\Symantec\pcAnywhere;
    C:\Program Files\Executive Software\DiskeeperServer\;C:\Program Files\Perforce}

  • Equivalent of "C static local" variable?

    Hi!
    I am trying to write a sub-VI that has multiple call modes
    (init, do1, do2) and needs to remember some variables set in the
    'init' call. When I try the straightforward way of just placing
    indicators as temporary variables on the front panel, these seem
    to reset to the default values every time the VI is called.
    Is there any equivalent of the static local variables used in C?
    Or do I have to use GLOBAL variables?
    Rudolf

    There are several solutions:
    1. Global variables.
    You can create global variable for each of your temorary variables. This is easy to do but I think it's not very convivient way to pass data.
    2. One Global variable.
    If you have many temporary variables you can organize them into cluster and create only one global variable for this cluster. Then you have to read and write this cluster in your SubVI every time you change any of your temporary variables.
    3. Pass data to/from your SubVI.
    If you look at the most of LV VIs you will see that very often they have some practically identical input and output nodes. For example "AI Start.vi" has " task ID in' and "task ID out" nodes. You can make the same thing. Let your subVI reads and writes some cluster of your tempora
    ry variables through its input and output nodes. So you will have the access to this variables in any place ofyour main VI. Also you can change and create your own clusters of temp variables in your main VI. And also you will get the ability to pass these data to your subVI using local variables or shift registers or sequence locals in your main VI
    I think that the last way is the most useful.
    Good luck.
    Oleg Chutko.

  • Local variable in script/MDX logic

    Is it possible to define a local variable which will hold a calculated value temporarily to be used later in the program?

    Hello,
    no, it's not possible to use such kind of variables in BPC for NW script logic.
    Hope this info will help u,
    Dzmitry

Maybe you are looking for

  • Mac Pro/Boot Camp - inf files for Windows XP & Apple 23¨ cinema displays

    have a Mac pro with the ATI video card. I have installed Boot Camp 1.1 and can boot to win XP or Mac ok when I use a dell monitor for win xp. If I use the apple displays, the screen often doesn't turn on at all - just black screen though it has boote

  • No users available ; no database client tool

    Hi, during a system copy we are stuck due to the fact that we can not logon to the 4.6C system.  SAP is up-and-running without errors. The database runs on the IBM Mainframe with zOS with DB V8. The SAP application server runs on AIX. Since it is a o

  • Raw images not readable by lightroom or CS3 from 5d mkii

    Just got my new 5d mkii and went out to shoot my first images with it.  Capturing RAW only I shot 88 frames at Crater Lake.  When I got home I went through my normal procedures for downloading my images with Lightroom and it did not recognize the fil

  • I can't download songs from Itunes with Iphone 5

    Hi, Just a quick and probably easy to answer question (im a bit slow with the apple thing) when i log into Itunes from my Iphone 5, ALOT of the songs are greyed out & i can't download them... Very few songs ARE available, but not many... I've checked

  • Avg. Total Runtime of the BW Queries.

    Hi, In the EWA report we have the following entry  : Avg. Total Runtime of the BW Queries. What is included in this average reponse time ? If users executes queries in dialog and backgroung modes, is the backgroung runtime inluded in the 'Avg. Total