Hi Selina, That might be easiest, to do the last bit of editing outside Ferret in your c++ (I think sed is commonly included as part of Unix, so it still might be an option). ASCII output from Ferret is designed to have all the information available to you, but it is not set up to be flexible in all possible ways You can use the lengths of the strings to create format statements that'll align the text let len = strlen(ut1) list/file=temp.txt/nohead/format=(8X,A`len`)/APPEND ut1 let len = strlen(dt1) list/file=temp.txt/nohead/format=(8x,A`len)/APPEND dt1 ...And, rather than making a string bf1 containing the bad flag, use a FORMAT statement to write out the numeric value with the format that you want: ... let bf = `variable, return=bad` list/file=temp.txt/nohead/format=(8x,"BAD FLAG : ", f8.4)/APPEND bf Selina Satterfield wrote: Thanks Ansley, I will probably have to just do the switch in my C++ code since I can't use third party tools other than ferret. I have successfully re-created all the headers for COMMA and TAB formats. Is there any way to align all of this information. I tried passing the value for STRLEN in to the format command, but it ended up cutting off the header. Here is what my out put looks like: VARIABLE : Average Gradient Deg. C/100 Km DATA SET : SST 100KM GLOBAL FILENAME : MY_Descriptor.des FILEPATH : /HTML/www/product/1 BAD FLAG : 999.9 TIME : 16-MAY-2005 00:00 to 17-MAY-2005 00:00 I would like to have the first letter in each line to line up like this: VARIABLE : Average Gradient Deg. C/100 Km DATA SET : SST 100KM GLOBAL FILENAME : MY_Descriptor.des FILEPATH : /HTML/VisUser/www/product/1 BAD FLAG : 999.9 TIME : 16-MAY-2005 00:00 to 17-MAY-2005 00:00 list/file=temp.txt/nohead/format=(A50)/APPEND ut1 list/file=temp.txt/nohead/format=(A40)/APPEND dt1 list/file=temp.txt/nohead/format=(A40)/APPEND fn1 list/file=temp.txt/nohead/format=(A70)/APPEND fp1 list/file=temp.txt/nohead/format=(A40)/APPEND bf1 Also is there anyway to set the precision. For example I would like BAD FLAG to be set to 999.9000 I tried adding the precision option however it didn't change. list/PRECISION=8/file=temp.txt/nohead/format=(A40)/APPEND bf1 Thanks again. Selina --- Ansley Manke <ansley.b.manke@noaa.gov> wrote:Hi Selina, Ferret does not have a way to restore the coordinate labels that are removed with /NOHEAD. I wonder if you might want to leave the header and use a tool like sed afterwards to edit the time label. A spawn command from Ferret could do this from your script so that the editing would always occur when you create the file. Ansley Selina Satterfield wrote:I don't have the option to change to linux I havetostay with AIX, however, I have found another way to enter the information since I am dynamicallycreatingthe jnl file from C++ I can obtain the data settitle >from the database not sure why I didn't think of thatearlier. The only issue that I have left now is being abletodisplay the Coordinate headers that are removedfromASCII files when using LIST/NOHEAD For example the following X Y and T COORDINATES X COORDINATES: degrees_east 134.00 135.00 136.00 137.00 138.00 139.00 140.00 141.00 142.00 143.00 Y COORDINATES: degrees_north -46.000 -45.000 -44.000 -43.000 -42.000 -41.000 -40.000 -39.000 -38.000 -37.000 DATA: .... I could probably do this with my C++ code as well, however if ferret already has a way of doing this I would rather use that route. Again Thank you Jaison, Martin and Ansley for allofyour help. Selina __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spamprotection aroundhttp://mail.yahoo.com__________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |