Page 1 of 1
fixed length error
Posted: Fri Aug 15, 2014 12:12 pm
by hargun
hi,
i tried to read the fixed width but getting the below error
##I IIS-DSEE-TFSC-00001 14:05:18(013) <main_program> APT configuration file: /opt/IBM/InformationServer/Server/Configurations/default.apt
>##E IIS-DSEE-TOIX-00158 14:05:19(000) <sf_CONSUMER_LOAN_DAILY_ACCOUNT,0> Error reading on import.
>##E IIS-DSEE-TFRS-00050 14:05:19(001) <sf_CONSUMER_LOAN_DAILY_ACCOUNT,0> Bad record delimiter after fixed-length record: expected "\n", got "0"
>##E IIS-DSEE-TOIX-00179 14:05:19(002) <sf_CONSUMER_LOAN_DAILY_ACCOUNT,0> Import error at record 0.
>##E IIS-DSEE-TFOR-00089 14:05:19(003) <sf_CONSUMER_LOAN_DAILY_ACCOUNT,0> The runLocally() of the operator failed.
##I IIS-DSEE-TFOR-00094 14:05:19(004) <sf_CONSUMER_LOAN_DAILY_ACCOUNT,0> Output 0 produced 0 records.
>##E IIS-DSEE-TFOR-00089 14:05:19(005) <APT_CombinedOperatorController,0> The runLocally() of the operator failed.
The length of the first column is 11 and tried by changing the field width to 11 and datatype of first column is char.
Her is the copy book layout
001100* BASIC LOAN INFO
001200 10 X56216-ILP-LOAN-NUMBER PIC X(11).
001300 10 X56216-LOAN-STATUS PIC X(03).
the data in file look like
20005199394C-ODF PL DC036013.740000013
Can you please help me on this.i check all the forums but still getting the same error.
Posted: Fri Aug 15, 2014 1:34 pm
by chulett
Bottom line is your metadata in the stage is not correct. That and the copybook and data example don't really seem to match.
Your LOAN NUMBER is "20005199394" and the STATUS is "C-O"? Doesn't seem correct.
Posted: Fri Aug 15, 2014 6:07 pm
by hargun
hi chullet
The loan number is "20005199394" and the STATUS is "C-O" this is correct .
Posted: Fri Aug 15, 2014 9:36 pm
by chulett
OK. Where's the rest of your copybook?
Posted: Sat Aug 16, 2014 6:47 pm
by hargun
Hi chullet
here is the copybook
Code: Select all
001100* BASIC LOAN INFO
001200 10 X56216-ILP-LOAN-NUMBER PIC X(11).
001300 10 X56216-LOAN-STATUS PIC X(03).
001400 10 X56216-LOAN-TYPE PIC X(03).
001500 10 X56216-LOAN-PURPOSE PIC X(03).
001600 10 X56216-LOAN-SUB-PURPOSE PIC X(02).
001700 10 X56216-ORIGINAL-TERM PIC 9(03).
001800 10 X56216-ORIG-INTEREST-RATE PIC 9(03).9(06).
001900 10 X56216-CURR-INTEREST-RATE PIC 9(03).9(06).
002000 10 X56216-ACCRUAL-BASE PIC 9(03).
002100
002200* DATES
002300 10 X56216-DATE-LAST-BATCH PIC 9(08).
002400 10 X56216-LOAN-ISSUE-DATE PIC 9(08).
002500 10 X56216-1ST-PYMT-DUE-DATE PIC 9(08).
002600 10 X56216-DATE-LOAN-ADDED PIC 9(08).
002700 10 X56216-DATE-CURRENT-MATURITY PIC 9(08).
002800 10 X56216-OLDEST-DUE-DATE PIC 9(08).
002900 10 X56216-EFF-DATE-LAST-PAYMENT PIC 9(08).
003000 10 X56216-NEXT-RATE-CHANGE-DATE PIC 9(08).
003100 10 X56216-DATE-PAID-OFF PIC 9(08).
003200
003300* DEMOGRAPHICS & CODES
003400 10 X56216-GL-TYPE-CODE PIC X(03).
003500 10 X56216-COST-CENTER PIC 9(07).
003600 10 X56216-COMP-CALL-CODE PIC X(03).
003700 10 X56216-PRIMARY-OFFICER PIC X(05).
003800 10 X56216-DIRECT-INDIRECT-IND PIC X(01).
003900 10 X56216-VARIABLE-IND PIC X(01).
004000 10 X56216-ORIGINAL-CREDIT-SCORE PIC 9(05).
004100 10 X56216-ORIGINAL-LTV PIC 9(03).
004200 10 X56216-BUYDOWN-FLAG PIC X(01).
004300
004400* MATURITY
004500 10 X56216-NBR-TIMES-EXTENDED PIC 9(03).
004600 10 X56216-PREPAY-PNLTY-CODE PIC X(02).
004700 10 X56216-PPEN-TOTAL-TERM PIC 9(03).
004800 10 X56216-NBR-PYMTS-MADE PIC 9(03).
004900
005000* DELINQUENCY
005100 10 X56216-10-29-DAYS PIC 9(03).
005200 10 X56216-30-59-DAYS PIC 9(03).
005300 10 X56216-60-89-DAYS PIC 9(03).
005400 10 X56216-90-119-DAYS PIC 9(03).
005500 10 X56216-120-PLUS-DAYS PIC 9(03).
005600 10 X56216-NUMBER-DAYS-PAST-DUE PIC 9(05).
005700
005800* BILLING AND PAYMENTS
005900 10 X56216-BILLING-INT-ONLY PIC X(01).
006000 10 X56216-NBR-REMAINING-PAYMENTS PIC 9(05).
006100 10 X56216-PAYMENT-AMOUNT-ORIG PIC -9(09).99.
006200 10 X56216-PAYMENT-AMOUNT-CURR PIC -9(09).99.
006300 10 X56216-LST-REG-PMT-AMT PIC -9(09).99.
006400
006500* BALANCES
006600 10 X56216-NOTE-AMOUNT PIC -9(11).99.
006700 10 X56216-AGGR-DAYS-QTD PIC 9(03).
006800 10 X56216-AGGR-DAYS-YTD PIC 9(03).
006900 10 X56216-AGGR-NET-LOAN-BAL-YTD PIC -9(11).99.
007000 10 X56216-AMOUNT-DUE PIC -9(11).99.
007100 10 X56216-OUTSTANDING-BAL PIC -9(11).99.
007200 10 X56216-CUR-PRINCIPLE-BAL PIC -9(11).99.
007300 10 X56216-LAST-BILLED-PRIN PIC -9(09).99.
007400 10 X56216-LAST-BILLED-ESCROW-RES PIC -9(07).99.
007500 10 X56216-ORIG-FINANCED-FEES PIC -9(07).99.
007600
007700* CHARGE-OFF
007800 10 X56216-CHARGE-OFF-PRINCIPAL PIC -9(11).99.
007900 10 X56216-CHARGE-OFF-INTEREST PIC -9(09).99.
008000 10 X56216-CHARGE-OFF-PRIN-MTD PIC -9(11).99.
008100 10 X56216-PCOF-PRINCIPAL PIC -9(11).99.
008200* 10 X56216-PCOF-INTEREST - SEE BELOW
008300 10 X56216-PRIN-RECOV-THIS-YEAR PIC -9(11).99.
008400
008500* BORROWER
008600 10 X56216-PRIMARY-BORROWER-NAME PIC X(40).
008700 10 X56216-INDIR-LIABILITY-FLAG PIC X(01).
008800 10 X56216-BANKRUPTCY-FLAG PIC X(01).
008900
009000* COLLATERAL
009100 10 X56216-COLLATERAL-CODE PIC X(03).
009200 10 X56216-COLLATERAL-DESCRIPTION PIC X(30).
009300 10 X56216-NEW-USED-IND PIC X(01).
009400 10 X56216-PROP-ADDR-1 PIC X(40).
009500 10 X56216-PROP-ADDR-2 PIC X(40).
009600 10 X56216-PROP-CITY PIC X(25).
009700 10 X56216-PROP-STATE-CODE PIC X(02).
009800 10 X56216-PROP-ZIP PIC X(09).
009900
010000* ADDITIONAL FIELDS
010100 10 X56216-PCOF-INTEREST PIC -9(11).99.
010200 10 X56216-CHARGE-OFF-DATE PIC 9(08).
010300 10 X56216-REPOSSESSION-STATUS PIC X(01).
010400 10 X56216-DATE-IN-REPOSSESSION PIC 9(08).
010500 10 X56216-DATE-PAID-REINSTATED PIC 9(08).
010600 10 X56216-RATE-CHANGE-FREQ PIC X(02).
010700 10 X56216-RATE-CHANGE-INDEX PIC X(02).
010800 10 X56216-RATE-CHANGE-BASIS-PTS PIC 9(03).9(06).
010900 10 X56216-RATE-CHANGE-CEILING PIC 9(03).9(06).
011000 10 X56216-RATE-CHANGE-FLOOR PIC 9(03).9(06).
011100
011200* ADDED FOR CCAR PROJECT 5/2013 - PPM 43847
011300 10 X56216-SERVICING-BRANCH PIC 9(05).
011400 10 X56216-OLD-LOAN-NBR PIC X(17).
011500 10 X56216-PRIMARY-BORR-NBR PIC X(23).
011600 10 X56216-ASSOC-BORROWER-NBR PIC X(23).
011700 10 X56216-COLLATERAL-NUMBER PIC X(23).
011800 10 X56216-DEALER-NUMBER PIC X(23).
011900 10 X56216-DEALER-SHORT-NAME PIC X(25).
012000 10 X56216-SECONDARY-OFFICER PIC X(05).
012100 10 X56216-CURR-LOAN-TERM PIC 9(03).
012200 10 X56216-FINAL-CREDIT-SCORE PIC 9(05).
012300 10 X56216-CRSCR-OVERRIDE-REASON PIC X(02).
012400 10 X56216-NEW-CONVERTED-IND PIC X(01).
012500 10 X56216-CREDIT-REQUEST-ID PIC X(12).
012600 10 X56216-REIT-CODE PIC X(06).
012700 10 X56216-DATE-REIT-ELIGIBLE PIC 9(08).
012800 10 X56216-BILLING-FREQUENCY PIC 9(03).
012900 10 X56216-BILLING-METHOD PIC X(01).
013000 10 X56216-BILLING-PERIOD PIC X(01).
013100 10 X56216-PAYMENT-AMT-C-ODD PIC -9(09).99.
013200 10 X56216-LRLI-MAX-IR-DECR-PRD PIC 9(03).9(06).
013300 10 X56216-LRLI-MAX-IR-INCR-PRD PIC 9(03).9(06).
013400 10 X56216-LRLI-PRD-LENGTH PIC 9(03).
013500 10 X56216-INT-PAID-TO-PRIN-ITD PIC -9(09).99.
013600 10 X56216-PRIN-RECOV-TO-DATE PIC -9(11).99.
013700 10 X56216-INT-RECOV-TO-DATE PIC -9(09).99.
013800 10 X56216-NON-ACCR-TO-PRIN-ITD PIC -9(07).99.
013900 10 X56216-C-O-REASON-CODE-1 PIC X(01).
014000 10 X56216-C-O-REASON-CODE-2 PIC X(01).
014100 10 X56216-COLL-HOLD-REASON-CODE PIC X(02).
014200 10 X56216-COLL-STAT-CD-VALUE-RPO PIC X(01).
014300 10 X56216-COLL-STAT-MNT-DATE-RPO PIC 9(08).
014400 10 X56216-COLL-STAT-CD-VALUE-SKP PIC X(01).
014500 10 X56216-COLL-STAT-MNT-DATE-SKP PIC 9(08).
014600 10 X56216-COLL-STAT-CD-VALUE-LGL PIC X(01).
014700 10 X56216-COLL-STAT-MNT-DATE-LGL PIC 9(08).
014800 10 X56216-COLL-STAT-CD-VALUE-OTH PIC X(01).
014900 10 X56216-COLL-STAT-MNT-DATE-OTH PIC 9(08).
015000 10 X56216-COLL-STAT-CD-VALUE-ID PIC X(01).
015100 10 X56216-COLL-STAT-MNT-DATE-ID PIC 9(08).
015200 10 X56216-BANKRUPTCY-TYPE PIC X(03).
015300 10 X56216-BANKRUPTCY-DATE PIC 9(08).
015400 10 X56216-DATE-ORIGINAL-MATURITY PIC 9(08).
015500 10 X56216-CURRENT-DUE-DATE PIC 9(08).
015600 10 X56216-NEXT-DUE-DATE PIC 9(08).
015700 10 X56216-DATE-STATUS-SET PIC 9(08).
015800 10 X56216-ORIGINAL-LOAN-AMOUNT PIC -9(11).99.
015900 10 X56216-ORIGINAL-INSURANCE-AMT PIC -9(07).99.
016000 10 X56216-ORIGINAL-POINTS-AMT PIC -9(09).99.
016100 10 X56216-ORIGINAL-INTEREST-AMT PIC -9(07).99.
016200 10 X56216-PARTIAL-PAYMENT PIC -9(11).99.
016300 10 X56216-TOTAL-AMOUNT-PAST-DUE PIC -9(09).99.
016400 10 X56216-BEGINNING-MONTH-BAL PIC -9(09).99.
016500 10 X56216-INTEREST-ACCRUED-ITD PIC -9(09).99.
016600 10 X56216-INTEREST-DUE PIC -9(09).99.
016700 10 X56216-INTEREST-PAID-ITD PIC -9(07).99.
016800 10 X56216-INTEREST-WAIVED PIC -9(07).99.
016900 10 X56216-CHARGES-ASSESSED PIC -9(11).99.
017000 10 X56216-CHARGES-PAID-ITD PIC -9(11).99.
017100 10 X56216-CHARGES-WAIVED PIC -9(11).99.
017200 10 X56216-EXT-FEES-PAID-ITD PIC -9(07).99.
017300 10 X56216-LATE-CHG-PAID PIC -9(09).99.
017400 10 X56216-TOTAL-REBATE-DUE PIC -9(07).99.
017500 10 X56216-AGGR-DAYS-MTD PIC 9(03).
017600 10 X56216-AGGR-OUTSTND-BAL-MTD PIC -9(11).99.
017700
017800* ADDED FOR CCAR PROJECT 9/2013 - PPM 43847
017900* FROM UNITECM FILE - SEE CGQ.IL1H.BASE.CPY(ILLUNI)
018000 10 X56216-UNI-OUTS-BAL PIC -9(11).99.
018100 10 X56216-UNI-OUTS-BAL-CHG PIC -9(11).99.
018200 10 X56216-UNI-INT-PAID-ITD PIC -9(07).99.
018300 10 X56216-UNI-INT-PAID-ITD-CHG PIC -9(07).99.
018400 10 X56216-UNI-RECOV-ITD PIC -9(11).99.
018500 10 X56216-UNI-RECOV-CHG PIC -9(11).99.
018600 10 X56216-UNI-HNB-GAP-INCOME-ITD PIC -9(07).99.
018700 10 X56216-UNI-HNB-GAP-INCOME-CHG PIC -9(07).99.
018800 10 X56216-UNI-GAP-LOSS-RES-ITD PIC -9(07).99.
018900 10 X56216-UNI-GAP-LOSS-RES-CHG PIC -9(07).99.
019000 10 X56216-UNI-GAP-COMMISS-PAY-ITD PIC -9(07).99.
019100 10 X56216-UNI-GAP-COMMISS-PAY-CHG PIC -9(07).99.
019200 10 X56216-UNI-VSI-INS-LIAB-ITD PIC -9(07).99.
019300 10 X56216-UNI-VSI-INS-LIAB-CHG PIC -9(07).99.
019400 10 X56216-UNI-PROCESS-FEES-ITD PIC -9(07).99.
019500 10 X56216-UNI-PROCESS-FEES-CHG PIC -9(07).99.
019600 10 X56216-UNI-CL-HA-INS-LIAB-ITD PIC -9(07).99.
019700 10 X56216-UNI-CL-HA-INS-LIAB-CHG PIC -9(07).99.
019800 10 X56216-UNI-DIR-INS-INC-BR-ITD PIC -9(07).99.
019900 10 X56216-UNI-DIR-INS-INC-BR-CHG PIC -9(07).99.
020000 10 X56216-UNI-EXT-FEES-PAID-ITD PIC -9(07).99.
020100 10 X56216-UNI-EXT-FEES-PAID-CHG PIC -9(07).99.
020200* FROM FULL EXTRACT FILE
020300 10 X56216-GL-PRIN-LOAN-BAL PIC -9(11).99.
020400* ADDED FOR CCAR PROJECT 10/2014 - PPM 57128
020500 10 X56216-INTEREST-DAILY-FACTOR PIC -9(02).9(07).
020600 10 X56216-INTEREST-DAILY-CHARGE PIC -9(05).9(06).
020700 10 X56216-F90-UNEARNED-PREPD-AMT PIC -9(07).9(06).
020800 10 X56216-C90-UNEARNED-PREPD-AMT PIC -9(07).9(06).
020900 10 X56216-VSI-A15-REBATE-DUE PIC -9(07).99.
021000 10 X56216-GAP-A18-REBATE-DUE PIC -9(07).99.
021100 10 X56216-DLR-R01-REBATE-DUE PIC -9(07).99.
021200 10 X56216-NBR-COUPON-EXTENSIONS PIC 9(03).
021300 10 X56216-NBR-PROMO-EXTENSIONS PIC 9(03).
021400 10 X56216-NBR-DELQ-EXTENSIONS PIC 9(03).
Hers is the records from first line
Code: Select all
20005199394C-ODF PL DC036013.740000013.7400003662014072219970904199710191997091020001219200102192000092900000000000000002200033013043CE288DF00195000N0035003603203600900700300104902 00000 000000067.48 000000067.48 000000070.00 00000002045.66021202 00000233413.02 00000003255.13 00000001155.51 00000001155.51 000000000.00 0000000.00 0000075.00 00000001205.69 000000048.60 00000000000.00 00000000000.00 00000000000.00SUSAN M DELAHANTY NYM 1986 CCU BUICK U 00000000000.0020010119 0000000000000000 000.000000000.000000000.00000000066 00000000000000016090752 00000000000000000485911 DS49803600192 N000020812210 00000000001CM 000000067.61000.000000000.000000000 000000000.00 00000000000.00 000000000.00 0000000.003 00000000 00000000 00000000 00000000 00000000E072000102320000919200101192001021920010119 00000001815.00 0000155.66 000000000.00 0000000.00 00000000000.00 000000000.00 000001155.51 000002855.13 000002134.62 0000671.89 0000000.00 00000000785.00 00000000820.00 00000000000.00 0000070.00 000000750.00 0000000.00021 00000024265.71 00000000000.00 00000000000.00 0000671.89 0000000.00 00000000000.00 00000000000.00 0000000.00 0000000.00 0000000.00 0000000.00 0000000.00 0000000.00 0000000.00 0000000.00 0000075.00 0000000.00 0000119.39 0000000.00 0000006.27 0000000.00 0000070.00 0000000.00 00000000000.00 00.0003764 00000.434978 0000000.000000 0000000.000000 0000000.00 0000000.00 0000000.00002001000
Can you please help me on this.
Posted: Sat Aug 16, 2014 7:29 pm
by chulett
Probably best to use the CFF stage to read this as you can import the copybook directly... are you? It's important to understand that you must define each and every field size correctly in order to read any fixed-width record without error since there are no delimiters involved, it is (in essence) read byte by byte. You also need to know if it has a record delimiter as well as they can have one but they also don't need one.
How familiar are you with those COBOL data types / sizes?
Posted: Sat Aug 16, 2014 7:42 pm
by hargun
i am using the sequential file stage to read the fixed width file and here is the format
Record Level
Record Delimiter=UNIXLINE
RecordLenth=fixed
FieldDefaults
Delimiter=none
Quote=none
i am defining the fixed width of each field and i am familiar with Cobol datatypes.
For Ex for ILP-LOAN-NUMBER i am giving Char(11) .
This job has been ran fine previously except the last 10 fields i have added.
Please advise.
Posted: Sat Aug 16, 2014 7:59 pm
by chulett
hargun wrote:This job has been ran fine previously except the last 10 fields i have added.
OK, that's an important bit of news that should have been in your first post. That means the problem is confined to the definition of the last 10 fields. How have you defined
those fields?
Posted: Sun Aug 17, 2014 6:53 am
by hargun
Chulett
I have already defined a new 10 fields in job and new fields appends at the end of file.
Posted: Sun Aug 17, 2014 8:03 am
by chulett
Of course. Show us how you defined them as that is where your problem lies.
Posted: Sun Aug 17, 2014 7:15 pm
by hargun
Please find the fields below defined in sequential file.All the fields are set as null.
Code: Select all
020500 10 X56216-INTEREST-DAILY-FACTOR PIC -9(02).9(07). defined as decimal(9,7) with field width=9 and Null field value=' ' nine spaces
020600 10 X56216-INTEREST-DAILY-CHARGE PIC -9(05).9(06). defined as decimal(11,6) with field width=11 and Null field value=' ' 11 spaces
020700 10 X56216-F90-UNEARNED-PREPD-AMT PIC -9(07).9(06). defined as decimal(13,6) with field width=15 and Null field value=' ' 15 spaces
020800 10 X56216-C90-UNEARNED-PREPD-AMT PIC -9(07).9(06). defined as decimal(13,6) with field width=15 and Null field value=' ' 15 spaces
020900 10 X56216-VSI-A15-REBATE-DUE PIC -9(07).99. defined as decimal(9,2) with field width=11 and Null field value=' ' 11 spaces
021000 10 X56216-GAP-A18-REBATE-DUE PIC -9(07).99. defined as decimal(9,2) with field width=11 and Null field value=' ' 11 spaces
021100 10 X56216-DLR-R01-REBATE-DUE PIC -9(07).99. defined as decimal(9,2) with field width=11 and Null field value=' '
11 spaces
021200 10 X56216-NBR-COUPON-EXTENSIONS PIC 9(03). defined as decimal(3) with field width=3 and Null field value=' ' 3 spaces
021300 10 X56216-NBR-PROMO-EXTENSIONS PIC 9(03). defined as decimal(3) with field width=3 and Null field value=' ' 3 spaces
021400 10 X56216-NBR-DELQ-EXTENSIONS PIC 9(03). defined as decimal(3) with field width=3 and Null field value=' ' 3 spaces
i have tried again to view the data through sequential file and now i am getting the below error with no changes to job.
>##E IIS-DSEE-TOIX-00158 21:32:55(000) <sf_CONSUMER_LOAN_DAILY_ACCOUNT,0> Error reading on import.
>##E IIS-DSEE-TFRS-00050 21:32:55(001) <sf_CONSUMER_LOAN_DAILY_ACCOUNT,0> Bad record delimiter after fixed-length record: expected "\n", got "5"
>##E IIS-DSEE-TOIX-00179 21:32:55(002) <sf_CONSUMER_LOAN_DAILY_ACCOUNT,0> Import error at record 0.
>##E IIS-DSEE-TFOR-00089 21:32:55(003) <sf_CONSUMER_LOAN_DAILY_ACCOUNT,0> The runLocally() of the operator failed.
##I IIS-DSEE-TFOR-00094 21:32:55(004) <sf_CONSUMER_LOAN_DAILY_ACCOUNT,0> Output 0 produced 0 records.
##I IIS-DSEE-USBP-00001 21:32:55(000) <APT_CombinedOperatorController,0> called postFinalRunLocally
Posted: Sun Aug 17, 2014 10:11 pm
by chulett
Your first two field sizes are incorrect.
Posted: Mon Aug 18, 2014 6:53 am
by hargun
What would be the correct sizes for First field and second.
I am giving as decimal(9,7) for first X56216-INTEREST-DAILY-FACTOR PIC -9(02).9(07).
For second
X56216-INTEREST-DAILY-CHARGE PIC -9(05).9(06). giving as decimal(11,6).
please help me on this.
Posted: Mon Aug 18, 2014 7:26 am
by chulett
I'm unclear why you would get all of the others correct and yet those first two wrong.
You have to count the number of digits plus the explicit decimal plus the sign. You seem to have missed the last two elements making your 'field width' off by 2: the first should be 11 and the second 13.
Code: Select all
X56216-INTEREST-DAILY-FACTOR PIC -9(02).9(07). defined as decimal(9,7) with field width=11
X56216-INTEREST-DAILY-CHARGE PIC -9(05).9(06). defined as decimal(11,6) with field width=13
All of the rest factor that in correctly.