Joined: 07 Nov 2007
|Hi All...this is Viswanath. Nice to see various complex REXX problems and their solutions here.
Coming to my problem...
I have an input file which is a basic EZT macro for a file record layout. That is my input file is a FB file with lrecl=80. And it contains:
FIELD-NAME START-POSN LENGTH DATA-TYPE
FILE1-RECORD 1 100 A
FILE1-COUNTRY 1 10 A
FILE1-GROUP 11 8 N
Now reading this file sequentially, I am creating a SORT SYMNAMES(symbolic names)
That is my output file should be like:
I am using the WORD function to extract the field-name, starting-position, length, and the data-type like:
varName = word(OUTLOG.i,1)
starPos = word(OUTLOG.i,2)
varLen = word(OUTLOG.i,3)
varType = word(OUTLOG.i,4)
and then concatenating the above variables with commas like:
outrec = varName || ',' || startPos || ',' || varLen || ',' || varType
The problem is for variable length files, we need to add 4 for the starting-position field becaus of RDW(Record descriptor word).
That is I need to add 4 for the starPos field. As this is a string variable, it is giving me "Bad arithmetic conversion" abend.
Can anyone help me out if I can perform this addition on this string field.
Let me know if you require more information. Awaiting for your response.
Thanks in Advance,