Re: RECFM=VBA and no JCL
In CAJTOO59ww+TsXqxW=5z95vgjycyqt5tui+jesjilxw-yxle...@mail.gmail.com, on 12/08/2011 at 12:47 PM, Mike Schwab mike.a.sch...@gmail.com said: Don't forget the length fields. You are only getting 9 records per block. That depends on the block size and on the records actually written. Some of the records could be as short as 6 bytes. -- Shmuel (Seymour J.) Metz, SysProg and JOAT ISO position; see http://patriot.net/~shmuel/resume/brief.html We don't care. We don't have to care, we're Congress. (S877: The Shut up and Eat Your spam act of 2003) -- 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
Re: RECFM=VBA and no JCL
On Wed, 7 Dec 2011 19:45:58 -0800 Scott Ford scott_j_f...@yahoo.com wrote: :I am calling a program via Cobol and the output is RECFM=VBA,LRECL=133,BLKSIZE=1330 (only an example) :The actual allocations are done dynamically via BPXWDYN and work fine no problem. :I then close the file and free it and re-allocate it ( no JCL ) for this file its dynamic and of course I can read it. :If I code a 'DD' with a RECFM=VB,LRECL=137 it works great with no problems. I can I do the same internally inside my Cobol code without a 'DD' stmt ? I am not sure as to what you are asking. Perhaps you may wish to refer to Assignment name for environment variable in the COBOL reference. -- Binyamin Dissen bdis...@dissensoftware.com http://www.dissensoftware.com Director, Dissen Software, Bar Grill - Israel Should you use the mailblocks package and expect a response from me, you should preauthorize the dissensoftware.com domain. I very rarely bother responding to challenge/response systems, especially those from irresponsible companies. -- 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
Re: RECFM=VBA and no JCL
Wouldn't you just define the values via the FD in the COBOL program? For example: FD INPUT-FILE RECORDING MODE IS V RECORD IS VARYING IN SIZE FROM 1 TO 133 BLOCK CONTAINS 10 RECORDS DATA RECORD IS INPUT-REC. 01 INPUT-RECPIC X(133). -Original Message- From: Scott Ford [mailto:scott_j_f...@yahoo.com] Sent: Wednesday, December 07, 2011 10:46 PM To: IBM-MAIN@bama.ua.edu Subject: RECFM=VBA and no JCL All: I have the following situation: I am calling a program via Cobol and the output is RECFM=VBA,LRECL=133,BLKSIZE=1330 (only an example) The actual allocations are done dynamically via BPXWDYN and work fine no problem. I then close the file and free it and re-allocate it ( no JCL ) for this file its dynamic and of course I can read it. If I code a 'DD' with a RECFM=VB,LRECL=137 it works great with no problems. I can I do the same internally inside my Cobol code without a 'DD' stmt ? All comments and opinions are much appreciated. Regards, Scott J Ford Software Engineer http://www.identityforge.com -- 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 -- 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
Re: RECFM=VBA and no JCL
On Wed, 7 Dec 2011 19:45:58 -0800, Scott Ford wrote: I have the following situation: I'm having trouble parsing your post. Do you mind if I pick it apart? I am calling a program via Cobol You have a Cobol program? and the output is RECFM=VBA,LRECL=133,BLKSIZE=1330 (only an example) The actual allocations are done dynamically via BPXWDYN and work fine no problem. Ok. There is no DD statement in your JCL. I then close the file and free it and re-allocate it ( no JCL ) for this file its dynamic and of course I can read it. After writing the data set, you close it, free it and reallocate it so that you can open it for input? Same DDNAME or different? If I code a 'DD' with a RECFM=VB,LRECL=137 it works great with no problems. Ok. I assume without the BPXWDYN calls? I can I do the same internally inside my Cobol code without a 'DD' stmt ? Isn't that what you said you were doing first with BPXWDYN? -- Tom Marchant -- 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
Re: RECFM=VBA and no JCL
-Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@bama.ua.edu] On Behalf Of Scott Ford Sent: Wednesday, December 07, 2011 9:46 PM To: IBM-MAIN@bama.ua.edu Subject: RECFM=VBA and no JCL All: I have the following situation: I am calling a program via Cobol and the output is RECFM=VBA,LRECL=133,BLKSIZE=1330 (only an example) The actual allocations are done dynamically via BPXWDYN and work fine no problem. I then close the file and free it and re-allocate it ( no JCL ) for this file its dynamic and of course I can read it. If I code a 'DD' with a RECFM=VB,LRECL=137 it works great with no problems. I can I do the same internally inside my Cobol code without a 'DD' stmt ? All comments and opinions are much appreciated. Regards, Scott J Ford Software Engineer http://www.identityforge.com I don't really get what you want to do without a DD. My guess is that you have a program which creates output, perhaps a lot of output. You then want to close out the output file and go to another process within the same program which reads the output that it generated itself. And you want to do this using I/O statements, as opposed to some sort of in-memory structure. Perhaps due to the number of bytes which would be consumed. I.e. you want a FIFO scratch pad area, accessable via I/O statements. For COBOL, you can indeed to this without a DD statement coded. The current Enterprise COBOL has the ability to dynamically allocate a DD statement for you. http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IGY3LR50/4.2.3.1 . This is instead of using bpxwdyn. It does not truly eliminate the need for a DD. It just makes it transparent to the user. Of course, there was a complete discussion of how to set an environment variable using COBOL. Example COBOL program doing dynamic allocation via environment variable, complete (but does not directly address the scratch pad issue). PROCESS ADV,AWO,NOC(W),DATA(31),DYN,FSRT,FLAG(I,I),NODYNAM PROCESS INTDATE(ANSI),LANG(EN),LIB,LIST,MAP,NAME(ALIAS) PROCESS NONUM,NUMPROC(PFD),OBJ,OPT(FULL),PGMNAME(COMPAT),APOST PROCESS RENT,RMODE(AUTO),NOSEQ,SOURCE,NOSSRANGE, PROCESS NOTERM,TEST(NONE,NOSYM),TRUNC(BIN),VBREF, PROCESS XREF(FULL),ZWB,FASTSRT,AR(E) ID DIVISION. PROGRAM-ID. 'DYNALLOC'. AUTHOR. JOHN MCKOWN. INSTALLATION. UICI LIFE INSURANCE CENTER. DATE-WRITTEN. DATE-COMPILED. SECURITY. NONE. * ENVIRONMENT DIVISION. CONFIGURATION SECTION. SOURCE-COMPUTER. IBM-370. OBJECT-COMPUTER. IBM-370. SPECIAL-NAMES. INPUT-OUTPUT SECTION. FILE-CONTROL. SELECT CONTROL-CARD ASSIGN TO DSNAME ORGANIZATION IS SEQUENTIAL ACCESS MODE IS SEQUENTIAL FILE STATUS IS CONTROL-CARD-FILE-STATUS-1. I-O-CONTROL. *APPLY WRITE-ONLY ON REPORT1-FD. * DATA DIVISION. FILE SECTION. * FD CONTROL-CARD BLOCK CONTAINS 0 RECORDS LABEL RECORDS ARE STANDARD RECORDING MODE IS F . 01 INPUT-CARDPIC X(80). * WORKING-STORAGE SECTION. 77 CONTROL-CARD-FILE-STATUS-1PIC XX. 01 CEE3DMP-PARAMETERS. 05 CEE3DMP-TITLE PIC X(80) VALUE 'TEST DUMP'. 05 CEE3DMP-OPTIONSPIC X(255) VALUE 'NOTRACE NOENTRY'. 01 LE-FC. 02 CONDITION-TOKEN-VALUE. COPY CEEIGZCT. 03 CASE-1-CONDITION-ID. 04 SEVERITYPIC S9(4) BINARY. 04 MSG-NO PIC S9(4) BINARY. 03 CASE-2-CONDITION-ID REDEFINES CASE-1-CONDITION-ID. 04 CLASS-CODE PIC S9(4) BINARY. 04 CAUSE-CODE PIC S9(4) BINARY. 03 CASE-SEV-CTLPIC X. 03 FACILITY-ID PIC XXX. 02 I-S-INFOPIC S9(9) BINARY. * LOCAL-STORAGE SECTION. 77 RETURN-DATA PIC X(4). 01 ENV-DATA. 05 FILLER PIC X(11) VALUE 'DSNAME=DSN('. 05 DSN PIC X(110) VALUE IS LOW-VALUES. 01 P POINTER. 01 RC PIC S9(9) BINARY. 01 EOF-SWITCH PIC X VALUE IS LOW-VALUES. 88 EOF VALUE IS HIGH-VALUES. LINKAGE SECTION. 01 MVS-PARM. 05 MVS-PARM-LENGTH PIC S999 USAGE BINARY. 05 MVS-PARM-VALUEPIC X(120) . * PROCEDURE DIVISION USING MVS-PARM. START-UP. IF MVS-PARM-LENGTH +100 THEN DISPLAY 'INPUT PARM TOO LONG 100' UPON SYSOUT MOVE +8 TO RETURN-CODE STOP RUN END-IF MOVE MVS-PARM-VALUE(1:MVS-PARM-LENGTH) TO DSN(1:MVS-PARM-LENGTH) MOVE ') SHR' TO DSN(MVS-PARM-LENGTH + 1:5) MOVE LOW-VALUES TO DSN(MVS-PARM-LENGTH + 6:1) SET P TO ADDRESS OF ENV-DATA CALL 'PUTENV' USING BY VALUE P RETURNING RC IF RC 0 THEN DISPLAY 'PUTENV FAILED RC=' RC UPON SYSOUT MOVE +8 TO RETURN-CODE STOP RUN END-IF OPEN INPUT CONTROL-CARD IF CONTROL-CARD-FILE-STATUS-1 NOT = 0 THEN DISPLAY 'CANNOT OPEN FILE RC='
Re: RECFM=VBA and no JCL
Tom: No problem at all and a big thanks .. Here is the pseudo code : 1. Alloc dd(sysin) to disk Using BPXWDYN 2. Write control records to disk(sysin) 3. Alloc dd(sysprint) to disk Using BPXWDYN - Lrecl = 133 , Recfm=vb, dsorg=ps 4. Call program 5. Close sysin 6. Close sysprint 7. Free sysin 8. Free sysprint 9. Open #3 file from above as Optional in Cobol with Recording mode is V 10. Read file the output is unreadable. No 'DD' s for 1,3 or 9. If I add a 'DD' as shown below, it works fine //FILE2 DD DISP=SHR,DSN=SFORD.SYSPRINT, // DCB=(RECFM=VB,LRECL=137) Data Set Information More: + Data Set Name . . . . : SFORD.SYSPRINT General Data Current Allocation Management class . . : **None** Allocated cylinders : 5 Storage class . . . : **None** Allocated extents . : 1 Volume serial . . . : JASYS1 Device type . . . . : 3390 Data class . . . . . : **None** Current Utilization Organization . . . : PS Used cylinders . . : 1 Record format . . . : VBA Used extents . . . : 1 Record length . . . : 133 Block size . . . . : 27930 1st extent cylinders: 5 Secondary cylinders : 5 Data set name type : SMS Compressible : NO Creation date . . . : 2011/12/07 Referenced date . . : 2011/12/07 Expiration date . . : ***None*** My problem is that I dont want the 'DD' for the above file, not sure if I can read this file without one... Does that help ..??? Scott J Ford Software Engineer http://www.identityforge.com From: Tom Marchant m42tom-ibmm...@yahoo.com To: IBM-MAIN@bama.ua.edu Sent: Thursday, December 8, 2011 8:23 AM Subject: Re: RECFM=VBA and no JCL On Wed, 7 Dec 2011 19:45:58 -0800, Scott Ford wrote: I have the following situation: I'm having trouble parsing your post. Do you mind if I pick it apart? I am calling a program via Cobol You have a Cobol program? and the output is RECFM=VBA,LRECL=133,BLKSIZE=1330 (only an example) The actual allocations are done dynamically via BPXWDYN and work fine no problem. Ok. There is no DD statement in your JCL. I then close the file and free it and re-allocate it ( no JCL ) for this file its dynamic and of course I can read it. After writing the data set, you close it, free it and reallocate it so that you can open it for input? Same DDNAME or different? If I code a 'DD' with a RECFM=VB,LRECL=137 it works great with no problems. Ok. I assume without the BPXWDYN calls? I can I do the same internally inside my Cobol code without a 'DD' stmt ? Isn't that what you said you were doing first with BPXWDYN? -- Tom Marchant -- 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 -- 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
Re: RECFM=VBA and no JCL
On Thu, 8 Dec 2011 06:37:18 -0800, Scott Ford wrote: 3. Alloc dd(sysprint) to disk Using BPXWDYN - Lrecl = 133 , Recfm=vb, dsorg=ps 4. Call program 5. Close sysin 6. Close sysprint 7. Free sysin 8. Free sysprint 9. Open #3 file from above as Optional in Cobol with Recording mode is V what DDNAME? 10. Read file the output is unreadable. How can you read SYSPRINT after you free it? No 'DD' s for 1,3 or 9. If I add a 'DD' as shown below, it works fine //FILE2DD DISP=SHR,DSN=SFORD.SYSPRINT, // DCB=(RECFM=VB,LRECL=137) FILE2? -- Tom Marchant -- 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
Re: RECFM=VBA and no JCL
Tom: I finally got it to work let me explain: 1. Alloc dd(sysin) to disk Using BPXWDYN 2. Write control records to disk(sysin) 3. Alloc dd(sysprint) to disk Using BPXWDYN - Lrecl = 133 , Recfm=vb, dsorg=ps 4. Call program 5. Close sysin 6. Close sysprint 7. Free sysin 8. Free sysprint 9 Alloc File2 with DSN= pointing to sysprint dataset name with like the following 01 WS-FILEIN. 05 FILLER PIC X(40) VALUE ' ALLOC DD(FILE2) DA(SFORD.SYSPRINT) '. 05 FILLER PIC X(25) VALUE ' RECFM(VB) LRECL(137) SHR'. 9. Open #9 file from above as Optional in Cobol with Recording mode is V 10. Read file the output is perfect Thank you John McKown Scott J Ford Software Engineer http://www.identityforge.com From: Tom Marchant m42tom-ibmm...@yahoo.com To: IBM-MAIN@bama.ua.edu Sent: Thursday, December 8, 2011 10:22 AM Subject: Re: RECFM=VBA and no JCL On Thu, 8 Dec 2011 06:37:18 -0800, Scott Ford wrote: 3. Alloc dd(sysprint) to disk Using BPXWDYN - Lrecl = 133 , Recfm=vb, dsorg=ps 4. Call program 5. Close sysin 6. Close sysprint 7. Free sysin 8. Free sysprint 9. Open #3 file from above as Optional in Cobol with Recording mode is V what DDNAME? 10. Read file the output is unreadable. How can you read SYSPRINT after you free it? No 'DD' s for 1,3 or 9. If I add a 'DD' as shown below, it works fine //FILE2 DD DISP=SHR,DSN=SFORD.SYSPRINT, // DCB=(RECFM=VB,LRECL=137) FILE2? -- Tom Marchant -- 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 -- 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
Re: RECFM=VBA and no JCL
In 1323355038.81290.yahoomail...@web65513.mail.ac4.yahoo.com, on 12/08/2011 at 06:37 AM, Scott Ford scott_j_f...@yahoo.com said: 3. Alloc dd(sysprint) to disk Using BPXWDYN - Lrecl = 133 , Recfm=vb, dsorg=ps Does the program change that to VBA? 10. Read file the output is unreadable. What does that mean? The OPEN fails? A read fails? The data are shifted right one column? The last is what I would expect. You need to allow for the cc character. -- Shmuel (Seymour J.) Metz, SysProg and JOAT ISO position; see http://patriot.net/~shmuel/resume/brief.html We don't care. We don't have to care, we're Congress. (S877: The Shut up and Eat Your spam act of 2003) -- 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
Re: RECFM=VBA and no JCL
Don't forget the length fields. You are only getting 9 records per block. On Thu, Dec 8, 2011 at 11:43 AM, Shmuel Metz (Seymour J.) shmuel+ibm-m...@patriot.net wrote: In 1323355038.81290.yahoomail...@web65513.mail.ac4.yahoo.com, on 12/08/2011 at 06:37 AM, Scott Ford scott_j_f...@yahoo.com said: 3. Alloc dd(sysprint) to disk Using BPXWDYN - Lrecl = 133 , Recfm=vb, dsorg=ps Does the program change that to VBA? 10. Read file the output is unreadable. What does that mean? The OPEN fails? A read fails? The data are shifted right one column? The last is what I would expect. You need to allow for the cc character. -- Shmuel (Seymour J.) Metz, SysProg and JOAT ISO position; see http://patriot.net/~shmuel/resume/brief.html We don't care. We don't have to care, we're Congress. (S877: The Shut up and Eat Your spam act of 2003) -- 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 -- 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