What you propose has been done often. The HLASM has two assembler operations:
o PUNCH, for which text may contain set symbols, the current values of which are substituted into that text, and o REPRO, which simplistically inserts a card image into ther XSYSPUNCH output It also now contains a number of BIFs, e.g., A2D, which converts the (signed) value of an arithletic set symbol into a signed character-string representation of that value. I have myself generated entire C and PL/I routines and many COBOL 'DSECTs' for inclusion in COBOL source programs to permit them to access external database elements. I have also generated COBOL source statements for list-processing operations--things like running through an ordered list or searching a BST (because many COBOL programmers find them daunting). Depending upon your facility with the HLASM macro language you will find all this easy or, initially, more challenging; but be reassured: these things have been done successfully for many years. The old Stage 1 SYSGEN operation discussed here recently was implemented using a set of Assembler -F macro definitions that generated jobstep JCL, utility control statements, etc., etc., instead of machine instructions. If you encounter particular problems, post them here in some circumstantial detail. Help will be forthcoming. John Gilmore, Ashland, MA 01721 - USA ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html