Hi Liao, Yesterday when responding to your post wrote "I am not sure other than for training purposes why this is being attempted.
As the objective is to write a record to an output data set, which appears to have consistent attributes during execution but which may differ from execution to execution, the question arises "Is Assembler needed at all?" Provided the Cobol program is correctly defined to cater for the variety of output circumstances surely the requirement can be met simply by changing the LRECL externally, i.e. either in the JCL or via use of a pre-allocated data set. Use of System Determined BLKSIZE (SDB) should satisfy the need to change LRECL and BLKSIZE. (But is RECSIZE a term used more frequently with VSAM.)" Of course when I wrote that I had forgotten to let the engage my brain before letting the clutch out on my mouth, as I had forgotten about the RECORD CONTAINS clause. In order to rectify this situation I have produced a test job which invokes a Cobol Program (WSHOP99), which calls a single Assembler program to produce out to a file, with the record size being control via the JCL/File label (DSCB) as appropriate. I have tested the concept running first with 80 byte records, and then with 100 byte records without changing any programs. The assembler routine does not use RDJFCB, and does not even modify the DCB. The subtle difference is that only one Assembler subroutine is used and it contains both the output DCB and the write routine. This route gives the greatest flexibility as there is much less mandatory code in respect of the DCB leaving more options available for modification in the JCL. The test job stream is at www.kmsit.ltd.co.uk/cobasm1.html and there are embedded links in the JCL to display Cobol source and then Assembler source in their own browser windows. The direct links to the Cobol and Assembler are www.kmsitltd.co.uk/wshop99.html and www.kmsitltd.co.uk/outrtn.html respectively. In order to do the test with different inputs I also wrote an Assembler INRTN to read records into the area provided by the Cobol program so that OUTRTN could write them. I apologies if my earlier post misled you, or anybody else. Kind regards - Terry Terry Sambrooks Director KMS-IT Limited 228 Abbeydale Road South Dore Sheffield S17 3LA UK Tel: +44 (0)114 262 0933 WEB: www.legac-e.co.uk www.kmsitltd.co.uk Reg: England & Wales 3767263 at the above address All outgoing E-mails are scanned but it remains the recipients responsibility to ensure that their system is protected from viruses, trojans, worms, and spy-ware. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html

