Can both selects and both opens be in the same program? Use one open on one select, and if you get the error open the other file. Set a flag as to which open worked. Then before each I/O statement checks the flag and uses the matching I/O statement.
On Fri, Feb 18, 2011 at 6:36 AM, Sergio Lima <sergio...@hotmail.com> wrote: > Frank, > > We will migrate from VSE to ZOS. > If I understand, We can first, change all program on VSE, removing the AS > prefix from SELECT, and then, use the SAM-ESDS (MSAM). > And, when migrate the source from VSE to Z/OS, no change is required correct ? > If is this idea, is very good, but I think that the developer people have no > time to change this, unfortunatelly. > > Anyway, thanks very much from your help, and best regards. > > Sergio > >> Date: Thu, 17 Feb 2011 18:05:37 -0700 >> From: frank.swarbr...@efirstbank.com >> Subject: Re: Question about COBOL Program >> To: IBM-MAIN@bama.ua.edu >> >> What is your end goal? Is it to have the same source code work on both VSE >> and z/OS? Or are you just migrating to z/OS from VSE? >> >> If the former, I would recommend coding the select as non-VSAM (no AS- >> prefix). Then use a QSAM file on z/OS and a VSAM-managed SAM (MSAM; aka >> SAM-ESDS) on VSE. We just moved from VSE to z/OS last year. We used MSAM >> fairly extensively. No need for those awful EXTENT statements that are >> required by SD files. >> >> Of course, alternatively you could use VSAM ESDS instead of sequential on >> both VSE and z/OS. I know that z/OS shops prefer QSAM to ESDS in general (or >> so I've been told), but ESDS certainly is an option. >> >> Frank >> -- >> >> Frank Swarbrick >> Applications Architect - Mainframe Applications Development >> FirstBank Data Corporation - Lakewood, CO USA >> P: 303-235-1403 >> >> >> On 2/17/2011 at 12:44 PM, in message >> <snt137-w60ae05a8bf42cb28124dd1ac...@phx.gbl>, Sergio Lima >> <sergio...@hotmail.com> wrote: >> > Hello List, >> > >> > We had installed in our installation ZOS1.12 system , and also Z/VSE 4.2. >> > Under Z/VSE, is not very easy, work, with sequential files, if you don't >> > have a specific product for manage the VTOC space, that is our case. >> > Under Z/OS, it is not true, because, is not necessary specify the START of >> > a >> > LOCATION from a file in to disk. >> > So, We thing change all of our JCL, when the file is VSAM under Z//VSE : // >> > DLBL MYFILE,'MYFILE.VSAM',,VSAM , to sequential files under Z/OS, >> > //MYFILE DD DSN=MYFILE.SEQ,DISP=SHR, without change the source of a COBOL >> > program. >> > >> > The test that We made here, show that this is not possible, so, We want >> > know >> > the opinions of this list, if this is really true. >> > >> > In a single COBOL, we wrote : >> > >> > SELECT ARQSEQ ASSIGN TO SYS010-AS-ARQSEQ >> > FILE STATUS IS FS-ARQSEQ. >> > >> > Then running ok for VSAM, but not for a sequential file, had Return code = >> > 37. >> > >> > When running with this : >> > >> > SELECT ARQSEQ ASSIGN TO SYS010-UT-ARQSEQ >> > >> > Here, run ok for sequential file, but for VSAM had : >> > >> > IGZ0200W A file attribute mismatch was detected. File ARQSEQ in program >> > LESEQ was defined as a physical sequential >> > file and the file specified in the ASSIGN clause was a VSAM data >> > set. >> > >> > and the program end with Return code = 39. >> > >> > Thanks very much >> > >> > Sergio Lima Costa >> > Sao Paulo - Brazil -- 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...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html