|
Well, despite the other answers you've received, I don't think it's quite that simple. First, what do you mean "Character string"? If you just mean "all the data in a record format", then a data structure is all you need. However, if you're expecting human readable data, then numeric values will be a problem. Take a numeric value with decimal digits (say 7s2 -123.45) and tell me how you want this value to be represented in a character string. I'll bet you that the negative sign will cause you grief, since RPG won't see "-00123.45" as a valid numeric value. You can convert this string into a value in your program, but it can't be done automatically by the compiler. The character image of a numeric value is longer than the base data, since you must render the sign and the decimal point in addition to the digits of the value..... Eric DeLong Sally Beauty Company MIS-Project Manager (BSG) 940-297-2863 or ext. 1863 -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of James H H Lampert Sent: Monday, August 07, 2006 11:18 AM To: rpg400-l@xxxxxxxxxxxx Subject: Getting an entire record as a character string I'm putting together a "preload" program to generate records in one file by riding "The Cycle" through another file. The source file is designated as the primary file for cycle control, and it's externally-described. The target file has a field that takes a complete image of the source record (as well as a number of fields that get populated from individual fields in the source record). Is there an easy way I can access the source record both as its individual fields and as one big character string? -- JHHL
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.