Focal Point
[SOLVED] Extract the all data

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/3231094803

November 24, 2008, 08:24 AM
Raghuraman K
[SOLVED] Extract the all data
Hi,

I have two table name is emp and pltdetail. i have extract all the data from emp and extract which is match in empcode from emp to pltdetail. I tried but i can't extract that data. Please tell me how to extract the data. see the below example.


Table names:

emp
empcode emploc
------- -------
AAAAAA newyork
BBBBBB DETROIT
CCCCCC washinton
DDDDDD michigo


Pltdetail
empcode pltcode
-------- --------
AAAAAA 87
BBBBBB 95



FOCUS code:


join empcode in emp to empcode in pltdetial as jo1

table file emp
print empcode emploc pltcode
end

Result below.

empcode emploc pltcode
------- ------- -------
AAAAAA newyork 87
BBBBBB DETROIT 95


But i need entire data from emp.

like below

empcode emploc pltcode
------- ------- -------
AAAAAA newyork 87
BBBBBB DETROIT 95
CCCCCC washinton
DDDDDD michigo

This message has been edited. Last edited by: Kerry,


Raghuraman K
November 24, 2008, 08:41 AM
jimster06
Are you familiar with the ALL parameter?

As in SET ALL = ON ?

You have what is commonly referred to as a short path error.

Look at the documentation for this parameter.


jimster06
DevStu WF 7.6.11
W7
HTML, PDF, EXL2K
November 24, 2008, 08:42 AM
Danny-SRL
What are the tables? Sequential files? SQL tables? Focus files?


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

November 24, 2008, 08:43 AM
jimster06
Please also update your signature with platform and version info.


jimster06
DevStu WF 7.6.11
W7
HTML, PDF, EXL2K
November 24, 2008, 09:14 AM
Raghuraman K
Daniel,

it is sequential file.


Raghuraman K
November 24, 2008, 09:57 AM
Danny-SRL
Raghuraman,

Are you files sorted by empcode?

See my example which works the way you want:
  
-* File Raghuraman1.fex
SET HOLDLIST=PRINTONLY

-*Only 3 records here
TABLE FILE CAR
SUM SALES/I5S
BY COUNTRY
IF COUNTRY LE ITALY
ON TABLE HOLD AS H1
END

-* 5 records here
TABLE FILE CAR
COUNT CAR
BY COUNTRY
ON TABLE HOLD AS H2
END

-* All 5 records and the joined fields here
JOIN COUNTRY IN H2 TO COUNTRY IN H1 AS Z

TABLE FILE H2
PRINT *
END



Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

November 24, 2008, 10:42 AM
TexasStingray
As stated above just set the ALL option. You want a left-outer join and this will give it to you.




Scott

I have tried all statements but still i am get the all data.


Raghuraman K
quote:
But i need entire data from emp.

like below

empcode emploc pltcode
------- ------- -------
AAAAAA newyork 87
BBBBBB DETROIT 95
CCCCCC washinton
DDDDDD michigo


you said you wanted all the data

use this

SET ALL = ON

join empcode in emp to empcode in pltdetial as jo1

table file emp
print empcode emploc pltcode
end
  





Scott

Still it not working. i tried below code.


SET ALL=ON
JOIN CONCERN IN PWR TO CONCERN IN PWRSP AS J01

TABLE FILE PWR
PRINT HISTORY LEAD_MODEL MODEL_YEAR_ENG
CAUSAL_FACTOR_1 CAUSAL_FACTOR_2 CAUSAL_FACTOR_3
plant product
ON TABLE SAVE AS CONIN
END


But i have received the below error.
(FOC1070) VALUE FOR JOIN 'FROM' FIELD OUT OF SEQUENCE. RETRIEVAL ENDED


Raghuraman K
Like the error says ..... Files being JOIN'ed should be pre-sorted on the Join-field.

Please resort one/both of the file(s) on the CONCERN field to Hold files as applicable. Then execute the join on the Hold files.

Sandeep Mamidenna


-------------------------------------------------------------------------------------------------
Blue Cross & Blue Shield of MS
WF.76-10 on (WS2003 + WebSphere) / EDA on z/OS + DB2 + MS-SQL
MRE, BID, Dev. Studio, Self-Service apps & a dash of fun !! Music
the safest method to fix this issue is to table the PWRSP data and hold as a FOCUS format file indexing CONCERN, it will then give you what you want.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

Yes Now it is working.
I have sorted both file and i have joined two file. Now it is working.

Thanks for all.


Raghuraman K