Guys, Thanks guys that occurred to me but my old mind keep saying there's a better way..
Scott ford www.identityforge.com from my IPAD > On Feb 10, 2014, at 5:24 PM, Mike Schwab <mike.a.sch...@gmail.com> wrote: > > Leave out the FB Record size and you can use variable RECORD-LENGTH to > determine how many bytes are in the record. > > On Mon, Feb 10, 2014 at 3:06 PM, John McKown > <john.archie.mck...@gmail.com> wrote: >> I did a quick test. The simplest way was to simply have two SELECT >> sentences which reference the same DD. >> >> FILE-CONTROL. >> SELECT FB ASSIGN TO UT-S-INPUT >> FILE STATUS IS FB-STATUS-1 >> . >> SELECT VB ASSIGN TO UT-S-INPUT >> FILE STATUS IS VB-STATUS-1 >> . >> ... >> FILE SECTION. >> FD FB >> RECORD CONTAINS 80 CHARACTERS >> RECORDING MODE IS F >> BLOCK CONTAINS 0 RECORDS >> LABEL RECORDS ARE OMITTED >> . >> 01 FB-RECORD. >> 05 CARD-IMAGE PIC X(80). >> FD VB >> RECORDING MODE IS V >> RECORD IS VARYING IN SIZE >> FROM 1 TO 80 CHARACTERS >> DEPENDING ON VB-LRECL >> BLOCK CONTAINS 0 RECORDS >> LABEL RECORDS ARE OMITTED >> . >> 01 VB-RECORD. >> 05 CARD-COLUMN OCCURS 1 TO 80 TIMES >> DEPENDING ON VB-LRECL >> PIC X(1). >> ... >> PROCEDURE DIVISION. >> ... >> OPEN INPUT FB >> IF FB-FILE-STATUS-1 IS NOT 00 THEN >> OPEN INPUT VB >> IF VB-FILE-STATUS-1 IS NOT 00 THEN >> DISPLAY 'CANNOT OPEN INPUT FILE.' >> MOVE 8 TO RETURN-CODE >> GOBACK >> END-IF >> ENDIF >> ... >> IF FB-FILE-STATUS-1 IS ZERO THEN >> READ FB-RECORD >> MOVE FB-RECORD TO WS-RECORD >> ELSE >> READ VB-RECORD >> MOVE VB-RECORD (1:VB-LRECL) TO WS-RECORD >> END-IF >> ... process data in WS-RECORD >> >> >> >>> On Mon, Feb 10, 2014 at 5:16 PM, Scott Ford <scott_j_f...@yahoo.com> wrote: >>> >>> All: >>> >>> >>> I have a Cobol program that can input either RECFM=FB or RECFM=VB and I am >>> trying to make it easier for our customers to use. >>> >>> The input file can be either and whats the simplest way to tell the >>> program that the input is FB OR VB. I was thinking PARM= ... >>> >>> >>> What do you guys/gals think ? >>> >>> >>> >>> >>> >>> >>> Best Regards, >>> >>> Scott Ford >>> >>> www.identityforge.com >>> >>> ---------------------------------------------------------------------- >>> For IBM-MAIN subscribe / signoff / archive access instructions, >>> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN >>> >> >> >> >> -- >> Wasn't there something about a PASCAL programmer knowing the value of >> everything and the Wirth of nothing? >> >> Maranatha! <>< >> John McKown >> >> ---------------------------------------------------------------------- >> For IBM-MAIN subscribe / signoff / archive access instructions, >> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN > > > > -- > Mike A Schwab, Springfield IL USA > Where do Forest Rangers go to get away from it all? > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN