AnsweredAssumed Answered

Positioned flat file with dynamic length

Question asked by phi on Oct 16, 2017
Latest reply on Oct 17, 2017 by phi

Hi,

 

I have a positioned flat file but there is one field with dynamic length and a trailing blank character to know that field ends. As below:

Element/FieldLength
Customer number7
Product number20
Quantity7
Flight number10
Shipment numberif this field >7, keep this value, otherwise, set the length to 7
Blank space1
Day8
Time6

 

Example 1: Shipment number <7 characters

38623  PROD123456          0001225SM071     20174   20170929125331

Customer number: 38623

Product number: PROD123456

Quantity: 1225

Flight number: SM071

Shipment number: 20174

Day: 20170929

Time: 125331

 

Example 2: Shipment number >7 characters

38623  PROD123456          0001225SM071     201740107220 20170929125331

Customer number: 38623

Product number: PROD123456

Quantity: 1225

Flight number: SM071

Shipment number: 201740107220

Day: 20170929

Time: 125331

 

Do you have any idea to create a profile for this format?

 

Thank you,

Phi

Outcomes