Sorry! Didn't saw it was about RRDS ! Disregard this...
Regards, Thomas Berg __________________________________________ Thomas Berg Specialist IT-U SWEDBANK > -----Ursprungligt meddelande----- > Från: IBM Mainframe Discussion List > [mailto:[EMAIL PROTECTED] För Thomas Berg > Skickat: den 10 december 2008 13:23 > Till: [email protected] > Ämne: SV: Cobol and variable record length RRDS files > > Here is an example/model of COBOL program that deals with > variable length files, look for variable RECL-INFIL: > > IDENTIFICATION DIVISION. > PROGRAM-ID. > AAAG001. > ENVIRONMENT DIVISION. > INPUT-OUTPUT SECTION. > FILE-CONTROL. > SELECT AAAA001I ASSIGN TO UT-S-AAAH001I > FILE STATUS IS FS-INFIL. > SELECT AAAA001U ASSIGN TO UT-S-AAAH001U > FILE STATUS IS FS-UTFIL. > I-O-CONTROL. > DATA DIVISION. > * > FD AAAH001I > LABEL RECORD STANDARD > RECORD IS VARYING IN SIZE FROM 1 TO 12345 > DEPENDING ON RECL-INFIL > BLOCK 0 CHARACTERS > DATA RECORD IS AAAB001I > RECORDING MODE IS V. > 01 AAAB001A. > 02 FILLER PIC X(12345). > * > FD AAAH001U > LABEL RECORD STANDARD > BLOCK 0 CHARACTERS > DATA RECORD IS AAAB001U > RECORDING MODE IS V. > 01 AAAB001B. > 02 FILLER OCCURS 12345 DEPENDING ON RECL-UTFIL PIC X. > * > WORKING-STORAGE SECTION. > 77 FLAG INFILEN-SLUT IS FALSE. > 01 RECL-INFIL PIC S9(04) COMP. > 01 RECL-UTFIL PIC S9(04) COMP. > 01 STATUSKODER. > 05 FS-INFIL PIC 9(02) VALUE 0. > 05 FS-UTFIL PIC 9(02) VALUE 0. > * > PROCEDURE DIVISION. > A-STYR. > * > OPEN INPUT AAAH001I > OUTPUT AAAH001U > READ AAAH001I > IF END > SET-TRUE INFILEN-SLUT > ENDIF > MOVE 666 TO RECL-UTFIL > WRITE AAAB001U > CLOSE AAAH001I > AAAH001U > GOBACK > > > > Regards, > Thomas Berg > __________________________________________ > Thomas Berg Specialist IT-U SWEDBANK > > > > > -----Ursprungligt meddelande----- > > Från: IBM Mainframe Discussion List > > [mailto:[EMAIL PROTECTED] För ??? ?? ??? > > Skickat: den 10 december 2008 11:53 > > Till: [email protected] > > Ämne: Cobol and variable record length RRDS files > > > > Hi > > > > > > > > One of our users is writing a program that reads a variable > > record length RRDS file. > > > > > > > > He asked me if there is a way determine the actual record > > length of a particular record. > > > > > > > > Thanks > > > > > > > > Gadi > > > > > > > ---------------------------------------------------------------------- > > 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 > > > > ---------------------------------------------------------------------- > 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 > ---------------------------------------------------------------------- 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

