50 pts.
 Logical file with Substring fields
I have a Physical file field 100 characters long. But it has more than one data elements with various data types in this field. I know these sub fields’ types, starting positions and lengths. I tried to create a Logical file to describe these sub fields using “SST” function. But I got an error for numeric field. 1400 PREMTOT 9S 2I SST(BATCHDATA 22 9) * CPD7926-********** . * CPD7554-* . ID Severity Number * CPD7554 20 2 Message . . . . : Keyword not valid with data type or keyboard shift value. * CPD7926 30 2 Message . . . . : Field not found. Please help me to define these numeric fields. Thank you, Hewage

Software/Hardware used:
ASKED: May 12, 2009  4:12 PM
UPDATED: May 13, 2009  2:39 PM

Answer Wiki:
I think the only kind of field you can create through the substri /////////////// How are you going to use this file? Could you structure it in RPGLE Could you create a new PF and copy the data? Phil
Last Wiki Answer Submitted:  May 12, 2009  9:00 pm  by  philpl1jb   44,220 pts.
All Answer Wiki Contributors:  philpl1jb   44,220 pts. , TheHeck   165 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

Thanks Tod,
Yes, It works for Alpha fields. But I need to define it as Numeric filed with two decimals. Is it possible?

 50 pts.

 

Hi,

I would suggest you create a Physical with the fields defined in it and use that as an external data structure. Read your flat file into the DS which will then populate your fields.

Regards,

Martin Gilbert.

 23,625 pts.

 

Currently we used DS method. We decided not use COPY to new PF file method due to the file size and multiple users. So I wish I can create a Logical file.
Thanks
Nihal

 50 pts.