Focal Point
[SOLVED] Proble in MATCH

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

December 07, 2008, 11:44 PM
Manish
[SOLVED] Proble in MATCH
Hi,

I'm trying using the below Focexec to Match Two files. One file contains information about patient and the other file conatins service charges that needs to be exclude. File file comes from a COBOL program. The record structure of COBOL file is:

01 OUT-FIELDS.
05 OUT-PT-NO PIC X(12) VALUE SPACES.
05 OUT-ATN-DR-NO-5 PIC 9(05) VALUE ZEROES.
05 OUT-ATN-DR-NO-1 PIC 9(01) VALUE ZERO.
05 OUT-REC-ID PIC X(01) VALUE SPACE.
05 OUT-ATN-DR-NAME PIC X(20) VALUE SPACES.
05 OUT-DTL-CHG-QTY PIC S9(04) VALUE ZEROES.
05 OUT-DTL-POST-MM PIC X(02) VALUE SPACES.

The fex is:
MATCH FILE RADP0094
SUM PT_NO
ATN_DR
REC_ID
ATN_DRNME
CHG_QTY
POST_DATE
DTL_SVCCD
DEPT_NO
PROC_MM
PROC_YY
BY DTL_SVCCD NOPRINT
BY PT_NO NOPRINT
BY ATN_DR NOPRINT
RUN
FILE SVCTABLE
SUM SVC_CODE
BY SVC_CODE NOPRINT
AFTER MATCH HOLD OLD-NOT-NEW
END

The Master file discription is:
FILE=RAD0094 ,SUFFIX=FIX
SEGNAME=RAD0094
FIELDNAME=PT_NO , ALIAS=PTNO , USAGE=A12 , ACTUAL=A12 ,
TITLE='PT NO',$
FIELDNAME=ATN_DR , ALIAS=ATNDR , USAGE=I6 , ACTUAL=A6 ,
TITLE='ATNDR',$
FIELDNAME=REC_ID , ALIAS=RECID , USAGE=A1 , ACTUAL=A1 ,
TITLE='RECID',$
FIELDNAME=ATN_DRNME , ALIAS=ATNDRNME , USAGE=A20 , ACTUAL=A20 ,
TITLE='ATNDRNME',$
FIELDNAME=CHG_QTY , ALIAS=CHGQTY , USAGE=I4 , ACTUAL=A04 ,
TITLE='CHGQTY',$
FIELDNAME=POST_DATE , ALIAS=POSTDATE , USAGE=A6 , ACTUAL=A06 ,
TITLE='POSTDATE',$
FIELDNAME=DTL_SVCCD , ALIAS=DTLSVCCD , USAGE=A7 , ACTUAL=A07 ,
TITLE='DTLSVCCD',$

While using the aboue FEX, I'm getting below error:

(FOC1346) : FORMAT ERROR: Record 1 , Column 39
(FOC1130) FORMAT CONVERSION ERROR FIELD/KEY : CHG_QTY
(FOC1346) : FORMAT ERROR: Record 2 , Column 39
(FOC1130) FORMAT CONVERSION ERROR FIELD/KEY : CHG_QTY
(FOC1346) : FORMAT ERROR: Record 3 , Column 39

Please advice, what and where the problem is?

Thanks.

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


7.1.6
Win XP
HTML
December 08, 2008, 01:01 AM
harsha.g
quote:
RADP0094

quote:
SEGNAME=RAD0094


Manish,
In the MATCH command, you are using the file name as "RADP0094" and where as in the masterfiles Segment name the name is different i.e. "RAD0094" (P is missing). Could that be the problem? Can you correct this and give a try?


Version: WebFOCUS 7.6.6
O.S. WebFOCUS is mounted on Unix
Output Report: HTML, Excel, CSV, PDF and TXT
December 08, 2008, 01:36 AM
Manish
Harsha,

I changed the segment name in the master file and I'm still getting the same problem. So this would not be the problem.


7.1.6
Win XP
HTML
December 08, 2008, 06:00 AM
jimster06
I would look carefully at the specification in the MFD (synonym) for CHG_QTY - Actual is alpha and usage is INT? Why?


jimster06
DevStu WF 7.6.11
W7
HTML, PDF, EXL2K
December 08, 2008, 07:01 AM
M Cavanaugh
Manish,
The error message means that the data starting in column 39 is in the wrong format.

The CHG_QTY field starts in column 39 so it is the field that is defined wrong.

Your MASTER is:
FIELDNAME=CHG_QTY , ALIAS=CHGQTY , USAGE=I4 , ACTUAL=A04 ,

Your COBOL description is:
05 OUT-DTL-CHG-QTY PIC S9(04) VALUE ZEROES.

An S9(04) will translate to:
Internal usage storage = 2 bytes
FOCUS Actual = I2
FOCUS Usage = I4

Try changing your MASTER and it should fix the problem.

You can find this documented in the mainframe FOCUS documentation under 'Field Format Conversion'.

Good Luck,
Michelle


WebFOCUS Production: UNIX 7.7.03M
WebFOCUS Test: UNIX EDASERVE 7.7.05 Client 8.0.01
December 08, 2008, 09:22 AM
GinnyJakes
According to the conversion chart that Michelle referenced, an S9(4) is a display numeric and there is a 1:1 relationship with the number displayed and the number of disk bytes used. The master format should be as follows:

FIELDNAME=CHG_QTY , ALIAS=CHGQTY , USAGE=P5, ACTUAL=Z04 ,
TITLE='CHGQTY',$ 


Note that the extra character in the USAGE is for the sign.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
December 08, 2008, 04:54 PM
PBrightwell
quote:
05 OUT-PT-NO PIC X(12) VALUE SPACES.
05 OUT-ATN-DR-NO-5 PIC 9(05) VALUE ZEROES.
05 OUT-ATN-DR-NO-1 PIC 9(01) VALUE ZERO.
05 OUT-REC-ID PIC X(01) VALUE SPACE.
05 OUT-ATN-DR-NAME PIC X(20) VALUE SPACES.
05 OUT-DTL-CHG-QTY PIC S9(04) VALUE ZEROES.
05 OUT-DTL-POST-MM PIC X(02) VALUE SPACES.


You need to examine your COBOL WS compared to your MFD.
The above should convert to:
A12
P05
P01
A1
A20
P04
A2

FIELDNAME=DTL_SVCCD , ALIAS=DTLSVCCD , USAGE=A7 , ACTUAL=A07 ,
TITLE='DTLSVCCD',$

isn't even in the output that you have listed.


Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes
December 08, 2008, 07:49 PM
j.gross
Once you get the MFD right ...

In order to merge properly, you have to make the match-key fieldnames in the two legs identical.
-* changes and comments in l.c.
SUM PT_NO ... PROC_YY 
BY DTL_SVCCD as svc_code
BY PT_NO NOPRINT 
BY ATN_DR NOPRINT 
RUN 
FILE SVCTABLE 
SUM SVC_CODE noprint (it will be null anyway for old-not-new)
BY SVC_CODE 
AFTER MATCH HOLD OLD-NOT-NEW 
END

This message has been edited. Last edited by: j.gross,


- Jack Gross
WF through 8.1.05
December 09, 2008, 03:54 AM
Manish
Hi Ginny,

I change the declaration of CHG_QTY and execute FEX. It works in the focus. And when I used this file in other COBOL program, I got SOC7 at below step.

ADD WS-IN-DTL-CHG-QTY TO WS-OUT-DOC-YTD-PTS-CUR

I read the above file in another program where CHG-QTY is defined as:
05 WS-IN-DTL-CHG-QTY PIC S9(04).

The declaration for WS-OUT-DOC-YTD-PTS-CUR and WS-IN-DTL-CHG-QTY is:
05 WS-OUT-DOC-YTD-PTS-CUR PIC S9(05) VALUE ZERO COMP-3.

My new MFD is:
FILE=RADP0094 ,SUFFIX=FIX
SEGNAME=RADP0094
FIELDNAME=PT_NO , ALIAS=PTNO , USAGE=A12 , ACTUAL=A12 ,
TITLE='PT NO',$
FIELDNAME=ATN_DR , ALIAS=ATNDR , USAGE=I6 , ACTUAL=A6 ,
TITLE='ATNDR',$
FIELDNAME=REC_ID , ALIAS=RECID , USAGE=A1 , ACTUAL=A1 ,
TITLE='RECID',$
FIELDNAME=ATN_DRNME , ALIAS=ATNDRNME , USAGE=A20 , ACTUAL=A20 ,
TITLE='ATNDRNME',$
FIELDNAME=CHG_QTY , ALIAS=CHGQTY , USAGE=P5 , ACTUAL=Z4 ,
TITLE='CHGQTY',$
FIELDNAME=POST_DATE , ALIAS=POSTDATE , USAGE=A6 , ACTUAL=A06 ,
TITLE='POSTDATE',$
FIELDNAME=DTL_SVCCD , ALIAS=DTLSVCCD , USAGE=A7 , ACTUAL=A07 ,
TITLE='DTLSVCCD',$

Please advise.


7.1.6
Win XP
HTML
December 09, 2008, 04:11 AM
Manish
Sorry....I made some wrong declarations. Now my job is completed successful and I'm going to review the results.

Thanks to all who helped me to solve this issue.


7.1.6
Win XP
HTML