E8.12 Parse Delimited String B98220D limitations question

Dorota

Member
This is happening in E8.12
I am using B98220D Parse Delimited String to load values from the CSV table into variables. I can see that the input record is complete, I have 66 columns, comma delimited.
However, I can see in the debug that on column 20, values stop coming through.

VA rpt_FlatFileRecord_FFRC Input string (verified in the debug that it is complete) looks like this:
,3/1/2023,3/6/2023,3/13/2023,3/20/2023,3/27/2023,4/1/2023,4/3/2023,4/10/2023,4/17/2023,4/24/2023,5/1/2023,5/8/2023,5/15/2023,5/22/2023,5/29/2023,6/1/2023,6/5/2023,6/12/2023,6/19/2023,6/26/2023,7/1/2023,7/10/2022,7/17/2022,7/24/2022,7/31/2022,8/1/2023,8/7/2023,8/14/2023,8/21/2023,8/28/2023,9/1/2023,9/4/2023,9/11/2023,9/18/2023,9/25/2023,10/1/2023,10/9/2023,10/16/2023,10/23/2023,10/30/2023,11/1/2023,11/6/2023,11/13/2023,11/20/2023,11/27/2023,12/1/4/2023,12/4/2023,12/11/2023,12/18/2023,12/25/2023,1/1/2024,1/8/2024,1/15/2024,1/22/2024,1/29/2024,2/1/2024,2/5/2024,2/12/2024,2/19/2024,2/26/2024,3/1/2024,3/4/2024,3/11/2024,3/18/2024,3/25/2024

Code:
Parse Delimited String
VA rpt_FlatFileRecord_FFRC -> BF szInputObjectID
VA rpt_Date_Column19_CFSTR5 <- BF szOutputObjectSegment
"19.00" -> BF mnSegmentNumber
"," -> BF cDelimiter

Parse Delimited String
VA rpt_FlatFileRecord_FFRC -> BF szInputObjectID
VA rpt_Date_Column20_CFSTR5 <- BF szOutputObjectSegment
20.00" -> BF mnSegmentNumber
"," -> BF cDelimiter

Parse Delimited String
VA rpt_FlatFileRecord_FFRC -> BF szInputObjectID
VA rpt_Date_Column21_CFSTR5 <- BF szOutputObjectSegment
"21.00" -> BF mnSegmentNumber
"," -> BF cDelimiter

Values populated:
VA rpt_Date_Column19_CFSTR5 = "6/26/2023"
VA rpt_Date_Column20_CFSTR5 = "7/1/202"
VA rpt_Date_Column21_CFSTR5 = null

Why is it happening??

I would appreciate any help you could provide.
 

Attachments

  • PSI.txt
    38.8 KB · Views: 7
When you said you checked the input string and it had all 66 columns I thought you were looking in the debugger in VC++. If you would have checked there you would have realized that you entire input string is not there.

The input parameter for that function is only 200 characters. You input string is clearly longer than that. Your input string is getting truncated so you will only get so many.
 
Thanks, Scott!
Is there another business function that you know of that would handle large input string? Or how else would you handle it?
 
Thank you for all your help. I now switched to using Parse Text String B0500690 and it works! I believe the size of the parameter is 2000.
 
I used something like this before. Can't remember how long the input field is (but I have also copied these BSFNS myself in the past and chosen a new input variable in the DSTR)
This code is in a repeating DO section. So maybe just alter it to make it loop

Code:
Finds a char position in a string

0001 //
0002 // This code keeps a running moving count of where it is in the parsed data
0003 // and actually chops it off field by field as it goes along. This way it is
0004 // only every processing the first field in the remaining data
0005 //
0006 VA rpt_szDTA1_FieldValue = ""
0007 VA sec_mnMATH01_CharPosition = ""
0008 //
0009 Finds a char position in a string
        VA rpt_F574211AGTSText01_Y57TXT1 -> BF szString
        "," -> BF cCharToFind
        <Zero> -> BF mnStartingPosition
        VA sec_mnMATH01_CharPosition <- BF mnPositionFound
0010 //
0011 If VA sec_mnMATH01_CharPosition is less than <Zero>
0012    VA rpt_szDTA1_FieldValue = VA rpt_F574211AGTSText01_Y57TXT1
0013 Else
0014    VA rpt_szDTA1_FieldValue = substr([VA rpt_F574211AGTSText01_Y57TXT1],0,[VA sec_mnMATH01_CharPosition])
0015    //
0016    VA sec_SubstStart_INT01 = [VA sec_mnMATH01_CharPosition]+1
0017    VA sec_SubstrFor_INT01 = length([VA rpt_F574211AGTSText01_Y57TXT1])-[VA sec_mnMATH01_CharPosition]
0018    //
0019    // Substr (DataField,StartPos,ForLength)
0020    VA rpt_F574211AGTSText01_Y57TXT1 = substr([VA rpt_F574211AGTSText01_Y57TXT1],[VA sec_SubstStart_INT01],[VA sec_SubstrFor_INT01])
0021    //
0022 End If
 
Last edited:
Back
Top