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
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'.
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:
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.