Opening a Spanned File for Input Using Assembler
I an trying to read a spanned file that has a record organzation of PS, a record format of VBS, a record length of 1, a blocksize of 27998 as per the file attributes, and a possible real record length of 65535. But in trying to open tne file I get a SOC4. I am not the greatest Assembler coder but my program is pretty simple. I know it is abending on the open. Anyone have any ideas. My actual input records in the spanned file are header records that are 76 bytes, data records that are 136 bytes, and trailer records that are 28 bytes. Any help will be greatly appreciated. TITLE 'XP1000' * * 02/25/11 B HUNT CHANGED A SPANNED FILE TO A FIXED FILE * XP1000 AMODE 31 XP1000 RMODE ANY XP1000 START COPY EQUATES SAVE (14,12) SAVE REGISTERS 14 THRU 12 BASR BASE1,0 ESTABLISH ADDRESSABILITY USING *,BASE1 PROVIDE BASE ID WTO ' START XP1000',X ROUTCDE=(2),X DESC=(7) B BEGIN SPACE 1 DS0D DCCL8'XP1000' DCCL8'SYSDATE' DCCL8'SYSTIME' SPACE 1 BEGINDS0H WTO ' BEFORE OPEN',ROUTCDE=(2),DESC=(7) OPEN (INFILE,INPUT,OUTFILE,OUTPUT) LTR 15,15 BNZ BADOPEN WTO ' GOOD OPEN FILE',ROUTCDE=(2),DESC=(7) LOOP DS 0H GET INFILE,INREC WTO ' GOOD FILE READ',ROUTCDE=(2),DESC=(7) MVC BATA,DATA WTO ' GOOD MOVE',ROUTCDE=(2),DESC=(7) PUT OUTFILE,OUTREC WTO ' GOOD FILE WRITE',ROUTCDE=(2),DESC=(7) B LOOP FINAL DS 0H WTO ' BEFORE FILE CLOSE',ROUTCDE=(2),DESC=(7) CLOSE (INFILE,,OUTFILE) WTO ' GOOD FILE CLOSE',ROUTCDE=(2),DESC=(7) B C100 BADOPEN WTO ' UABLE TO OPEN FILE',ROUTCDE=(2),DESC=(7) B C100 BADREAD WTO ' READ UNSUCCESSFUL ',ROUTCDE=(2),DESC=(7) B C100 BADWRITE WTO ' WRITE UNSUCCESSFUL ',ROUTCDE=(2),DESC=(7) B C100 C100 DS0H RETURN (14,12)RESTORE REGISTERS AND RETURN INFILE DCB DSORG=PS,RECFM=VBS,MACRF=GM,+ DDNAME=INDD,EODAD=FINAL OUTFILE DCB DSORG=PS,RECFM=FB,LRECL=28,BLKSIZE=2800,MACRF=PM, + DDNAME=OUTDD OUTREC DS0CL28 BATA DSCL28 SAVEAREA DS18F LTORG INRECDS0F DATA DSCL28 DSCL32000 DSCL32000 DSCL32000 END XP1000 09.38.22 JOB33865 -JOBNAME STEPNAME PROCSTEPRC EXCP CONN TCBSRB 09.38.22 JOB33865 -ASMJCL RMS RMS@2X 00
Re: Opening a Spanned File for Input Using Assembler
Maybe you want to give amode 24 a try. -Original Message- From: Bruce Hunt bruce.h...@trs.state.tx.us To: IBM-MAIN@bama.ua.edu Sent: Tue, Mar 8, 2011 10:43 am Subject: Opening a Spanned File for Input Using Assembler I an trying to read a spanned file that has a record organzation of PS, a record format of VBS, a record length of 1, a blocksize of 27998 as per the file ttributes, and a possible real record length of 65535. But in trying to open ne file I get a SOC4. I am not the greatest Assembler coder but my program s pretty simple. I know it is abending on the open. Anyone have any ideas. My ctual input records in the spanned file are header records that are 76 bytes, ata records that are 136 bytes, and trailer records that are 28 bytes. Any elp will be greatly appreciated. TITLE 'XP1000' 02/25/11 B HUNT CHANGED A SPANNED FILE TO A FIXED FILE P1000 AMODE 31 P1000 RMODE ANY P1000 START COPY EQUATES SAVE (14,12) SAVE REGISTERS 14 THRU 12 BASR BASE1,0 ESTABLISH ADDRESSABILITY USING *,BASE1 PROVIDE BASE ID WTO ' START XP1000',X ROUTCDE=(2),X DESC=(7) B BEGIN SPACE 1 DS0D DCCL8'XP1000' DCCL8'SYSDATE' DCCL8'SYSTIME' SPACE 1 EGINDS0H WTO ' BEFORE OPEN',ROUTCDE=(2),DESC=(7) OPEN (INFILE,INPUT,OUTFILE,OUTPUT) LTR 15,15 BNZ BADOPEN WTO ' GOOD OPEN FILE',ROUTCDE=(2),DESC=(7) OOP DS 0H GET INFILE,INREC WTO ' GOOD FILE READ',ROUTCDE=(2),DESC=(7) MVC BATA,DATA WTO ' GOOD MOVE',ROUTCDE=(2),DESC=(7) PUT OUTFILE,OUTREC WTO ' GOOD FILE WRITE',ROUTCDE=(2),DESC=(7) B LOOP INAL DS 0H WTO ' BEFORE FILE CLOSE',ROUTCDE=(2),DESC=(7) CLOSE (INFILE,,OUTFILE) WTO ' GOOD FILE CLOSE',ROUTCDE=(2),DESC=(7) B C100 ADOPEN WTO ' UABLE TO OPEN FILE',ROUTCDE=(2),DESC=(7) B C100 ADREAD WTO ' READ UNSUCCESSFUL ',ROUTCDE=(2),DESC=(7) B C100 ADWRITE WTO ' WRITE UNSUCCESSFUL ',ROUTCDE=(2),DESC=(7) B C100 100 DS0H RETURN (14,12)RESTORE REGISTERS AND RETURN NFILE DCB DSORG=PS,RECFM=VBS,MACRF=GM,+ DDNAME=INDD,EODAD=FINAL UTFILE DCB SORG=PS,RECFM=FB,LRECL=28,BLKSIZE=2800,MACRF=PM, + DDNAME=OUTDD UTREC DS0CL28 ATA DSCL28 AVEAREA DS18F LTORG NRECDS0F ATA DSCL28 DSCL32000 DSCL32000 DSCL32000 END XP1000
Re: Opening a Spanned File for Input Using Assembler
On 3/8/2011 9:43 AM, Bruce Hunt wrote: I an trying to read a spanned file that has a record organzation of PS, a record format of VBS, a record length of 1, a blocksize of 27998 as per the file attributes, and a possible real record length of 65535. But in trying to open tne file I get a SOC4. I am not the greatest Assembler coder but my program is pretty simple. I know it is abending on the open. Anyone have any ideas. My actual input records in the spanned file are header records that are 76 bytes, data records that are 136 bytes, and trailer records that are 28 bytes. Any help will be greatly appreciated. TITLE 'XP1000' * * 02/25/11 B HUNT CHANGED A SPANNED FILE TO A FIXED FILE * XP1000 AMODE 31 XP1000 RMODE ANY XP1000 START COPY EQUATES SAVE (14,12) SAVE REGISTERS 14 THRU 12 BASR BASE1,0 ESTABLISH ADDRESSABILITY USING *,BASE1 PROVIDE BASE ID WTO ' START XP1000',X ROUTCDE=(2),X DESC=(7) B BEGIN SPACE 1 DS0D DCCL8'XP1000' DCCL8'SYSDATE' DCCL8'SYSTIME' SPACE 1 BEGINDS0H WTO ' BEFORE OPEN',ROUTCDE=(2),DESC=(7) OPEN (INFILE,INPUT,OUTFILE,OUTPUT) You need the open options to be in parentheses: OPEN (INFILE,(INPUT),OUTFILE,(OUTPUT)) LTR 15,15 BNZ BADOPEN WTO ' GOOD OPEN FILE',ROUTCDE=(2),DESC=(7) LOOP DS 0H GET INFILE,INREC WTO ' GOOD FILE READ',ROUTCDE=(2),DESC=(7) MVC BATA,DATA WTO ' GOOD MOVE',ROUTCDE=(2),DESC=(7) PUT OUTFILE,OUTREC WTO ' GOOD FILE WRITE',ROUTCDE=(2),DESC=(7) B LOOP FINAL DS 0H WTO ' BEFORE FILE CLOSE',ROUTCDE=(2),DESC=(7) CLOSE (INFILE,,OUTFILE) WTO ' GOOD FILE CLOSE',ROUTCDE=(2),DESC=(7) B C100 BADOPEN WTO ' UABLE TO OPEN FILE',ROUTCDE=(2),DESC=(7) B C100 BADREAD WTO ' READ UNSUCCESSFUL ',ROUTCDE=(2),DESC=(7) B C100 BADWRITE WTO ' WRITE UNSUCCESSFUL ',ROUTCDE=(2),DESC=(7) B C100 C100 DS0H RETURN (14,12)RESTORE REGISTERS AND RETURN INFILE DCB DSORG=PS,RECFM=VBS,MACRF=GM,+ DDNAME=INDD,EODAD=FINAL OUTFILE DCB DSORG=PS,RECFM=FB,LRECL=28,BLKSIZE=2800,MACRF=PM, + DDNAME=OUTDD OUTREC DS0CL28 BATA DSCL28 SAVEAREA DS18F LTORG INRECDS0F DATA DSCL28 DSCL32000 DSCL32000 DSCL32000 END XP1000 09.38.22 JOB33865 -JOBNAME STEPNAME PROCSTEPRC EXCP CONN TCBSRB 09.38.22 JOB33865 -ASMJCL RMS RMS@2X 00 31 8 551177.00 09.38.22 JOB33865 + START XP1000 09.38.22 JOB33865 + BEFORE OPEN 09.38.25 JOB33865 IEA995I SYMPTOM DUMP OUTPUT 742 742 SYSTEM COMPLETION CODE=0C4 REASON CODE=0010 742 TIME=09.38.22 SEQ=02516 CPU= ASID=0060 742 PSW AT TIME OF ERROR 078C1000 80D26522 ILC 4 INTC 10 742NO ACTIVE MODULE FOUND 742NAME=UNKNOWN 742DATA AT PSW 00D2651C - 56403DD6 0B049180 20324710 742GR 0: 00011000 1: 00D00060 742 2: 001E9184 3: 00D264D2 742 4: 80D26522 5: 008FDBC0 742 6: 00D264D0 7: 00FBD480 742 8: 0E14409E 9: 8AAE2D88 742 A: 008CBC8D B: 008FF048 742 C: 010D93C0 D: 6008 742 E: 90D26518 F: 008FF048 742 END OF SYMPTOM DUMP //ASMJCL JOB (DP,6010),'XX - HUNT ',CLASS=A,MSGCLASS=X, // MSGLEVEL=(1,1),NOTIFY=SYSUID //* //RMS EXEC CA11RMS,TYPRUN='F' //* //ASMEXEC EXEC PGM=XP1000,REGION=0M //STEPLIB DD DISP=SHR,DSN=TEST.LE.LOADLIB //INDD DD DISP=SHR,DSN=TEST.FONT.BACKUP, // DSORG=PS,LRECL=X,BLKSIZE=27998,RECFM=VBS //OUTDDDD DSN=TEST.FONT.BACKUP.FIXED, // DISP=(,CATLG,CATLG), // SPACE=(TRK,(1950,100),RLSE), // DCB=(LRECL=28,BLKSIZE=0,RECFM=FB) //SYSOUT DD SYSOUT=* //SYSDBOUT DD SYSOUT=* //SYSUDUMP DD SYSOUT=* // -- Kind regards, -Steve Comstock The Trainer's Friend, Inc. 303-393-8716 http://www.trainersfriend.com * To get a good Return on your Investment, first make an investment! + Training your people is an excellent investment * Try our new tool for calculating your Return On Investment for training dollars at http://www.trainersfriend.com/ROI/roi.html
Re: Opening a Spanned File for Input Using Assembler
On 3/8/2011 9:43 AM, Bruce Hunt wrote: I an trying to read a spanned file that has a record organzation of PS, a record format of VBS, a record length of 1, a blocksize of 27998 as per the file attributes, and a possible real record length of 65535. But in trying to open tne file I get a SOC4. I am not the greatest Assembler coder but my program is pretty simple. I know it is abending on the open. Anyone have any ideas. My actual input records in the spanned file are header records that are 76 bytes, data records that are 136 bytes, and trailer records that are 28 bytes. Any help will be greatly appreciated. Ngafei Huang's suggestion for AMODE 24 was spot on. If you want to get into using AMODE 31 for programs that do I/O, you could check out our free paper I/O and AMODE 31 at http://www.trainersfriend.com/Papers/amode_31_io.pdf TITLE 'XP1000' * * 02/25/11 B HUNT CHANGED A SPANNED FILE TO A FIXED FILE * XP1000 AMODE 31 XP1000 RMODE ANY XP1000 START COPY EQUATES SAVE (14,12) SAVE REGISTERS 14 THRU 12 BASR BASE1,0 ESTABLISH ADDRESSABILITY USING *,BASE1 PROVIDE BASE ID WTO ' START XP1000',X ROUTCDE=(2),X DESC=(7) B BEGIN SPACE 1 DS0D DCCL8'XP1000' DCCL8'SYSDATE' DCCL8'SYSTIME' SPACE 1 BEGINDS0H WTO ' BEFORE OPEN',ROUTCDE=(2),DESC=(7) OPEN (INFILE,INPUT,OUTFILE,OUTPUT) LTR 15,15 BNZ BADOPEN WTO ' GOOD OPEN FILE',ROUTCDE=(2),DESC=(7) LOOP DS 0H GET INFILE,INREC WTO ' GOOD FILE READ',ROUTCDE=(2),DESC=(7) MVC BATA,DATA WTO ' GOOD MOVE',ROUTCDE=(2),DESC=(7) PUT OUTFILE,OUTREC WTO ' GOOD FILE WRITE',ROUTCDE=(2),DESC=(7) B LOOP FINAL DS 0H WTO ' BEFORE FILE CLOSE',ROUTCDE=(2),DESC=(7) CLOSE (INFILE,,OUTFILE) WTO ' GOOD FILE CLOSE',ROUTCDE=(2),DESC=(7) B C100 BADOPEN WTO ' UABLE TO OPEN FILE',ROUTCDE=(2),DESC=(7) B C100 BADREAD WTO ' READ UNSUCCESSFUL ',ROUTCDE=(2),DESC=(7) B C100 BADWRITE WTO ' WRITE UNSUCCESSFUL ',ROUTCDE=(2),DESC=(7) B C100 C100 DS0H RETURN (14,12)RESTORE REGISTERS AND RETURN INFILE DCB DSORG=PS,RECFM=VBS,MACRF=GM,+ DDNAME=INDD,EODAD=FINAL OUTFILE DCB DSORG=PS,RECFM=FB,LRECL=28,BLKSIZE=2800,MACRF=PM, + DDNAME=OUTDD OUTREC DS0CL28 BATA DSCL28 SAVEAREA DS18F LTORG INRECDS0F DATA DSCL28 DSCL32000 DSCL32000 DSCL32000 END XP1000 09.38.22 JOB33865 -JOBNAME STEPNAME PROCSTEPRC EXCP CONN TCBSRB 09.38.22 JOB33865 -ASMJCL RMS RMS@2X 00 31 8 551177.00 09.38.22 JOB33865 + START XP1000 09.38.22 JOB33865 + BEFORE OPEN 09.38.25 JOB33865 IEA995I SYMPTOM DUMP OUTPUT 742 742 SYSTEM COMPLETION CODE=0C4 REASON CODE=0010 742 TIME=09.38.22 SEQ=02516 CPU= ASID=0060 742 PSW AT TIME OF ERROR 078C1000 80D26522 ILC 4 INTC 10 742NO ACTIVE MODULE FOUND 742NAME=UNKNOWN 742DATA AT PSW 00D2651C - 56403DD6 0B049180 20324710 742GR 0: 00011000 1: 00D00060 742 2: 001E9184 3: 00D264D2 742 4: 80D26522 5: 008FDBC0 742 6: 00D264D0 7: 00FBD480 742 8: 0E14409E 9: 8AAE2D88 742 A: 008CBC8D B: 008FF048 742 C: 010D93C0 D: 6008 742 E: 90D26518 F: 008FF048 742 END OF SYMPTOM DUMP //ASMJCL JOB (DP,6010),'XX - HUNT ',CLASS=A,MSGCLASS=X, // MSGLEVEL=(1,1),NOTIFY=SYSUID //* //RMS EXEC CA11RMS,TYPRUN='F' //* //ASMEXEC EXEC PGM=XP1000,REGION=0M //STEPLIB DD DISP=SHR,DSN=TEST.LE.LOADLIB //INDD DD DISP=SHR,DSN=TEST.FONT.BACKUP, // DSORG=PS,LRECL=X,BLKSIZE=27998,RECFM=VBS //OUTDDDD DSN=TEST.FONT.BACKUP.FIXED, // DISP=(,CATLG,CATLG), // SPACE=(TRK,(1950,100),RLSE), // DCB=(LRECL=28,BLKSIZE=0,RECFM=FB) //SYSOUT DD SYSOUT=* //SYSDBOUT DD SYSOUT=* //SYSUDUMP DD SYSOUT=* // -- Kind regards, -Steve Comstock The Trainer's Friend, Inc. 303-393-8716 http://www.trainersfriend.com * To get a good Return on your Investment, first make an investment! + Training your people is an excellent investment * Try our
Re: Opening a Spanned File for Input Using Assembler
Adding the parameter BFTEK=A will cause the spanned records to be re-assembled during input processing, before they are handed to the application. Rick -- Bruce Hunt wrote: I an trying to read a spanned file that has a record organzation of PS, a record format of VBS, a record length of 1, a blocksize of 27998 as per the file attributes, and a possible real record length of 65535. But in trying to open tne file I get a SOC4. I am not the greatest Assembler coder but my program is pretty simple. I know it is abending on the open. Anyone have any ideas. My actual input records in the spanned file are header records that are 76 bytes, data records that are 136 bytes, and trailer records that are 28 bytes. Any help will be greatly appreciated. TITLE 'XP1000' * * 02/25/11 B HUNT CHANGED A SPANNED FILE TO A FIXED FILE * XP1000 AMODE 31 XP1000 RMODE ANY XP1000 START COPY EQUATES SAVE (14,12) SAVE REGISTERS 14 THRU 12 BASR BASE1,0 ESTABLISH ADDRESSABILITY USING *,BASE1 PROVIDE BASE ID WTO ' START XP1000',X ROUTCDE=(2),X DESC=(7) B BEGIN SPACE 1 DS0D DCCL8'XP1000' DCCL8'SYSDATE' DCCL8'SYSTIME' SPACE 1 BEGINDS0H WTO ' BEFORE OPEN',ROUTCDE=(2),DESC=(7) OPEN (INFILE,INPUT,OUTFILE,OUTPUT) LTR 15,15 BNZ BADOPEN WTO ' GOOD OPEN FILE',ROUTCDE=(2),DESC=(7) LOOP DS 0H GET INFILE,INREC WTO ' GOOD FILE READ',ROUTCDE=(2),DESC=(7) MVC BATA,DATA WTO ' GOOD MOVE',ROUTCDE=(2),DESC=(7) PUT OUTFILE,OUTREC WTO ' GOOD FILE WRITE',ROUTCDE=(2),DESC=(7) B LOOP FINAL DS 0H WTO ' BEFORE FILE CLOSE',ROUTCDE=(2),DESC=(7) CLOSE (INFILE,,OUTFILE) WTO ' GOOD FILE CLOSE',ROUTCDE=(2),DESC=(7) B C100 BADOPEN WTO ' UABLE TO OPEN FILE',ROUTCDE=(2),DESC=(7) B C100 BADREAD WTO ' READ UNSUCCESSFUL ',ROUTCDE=(2),DESC=(7) B C100 BADWRITE WTO ' WRITE UNSUCCESSFUL ',ROUTCDE=(2),DESC=(7) B C100 C100 DS0H RETURN (14,12)RESTORE REGISTERS AND RETURN INFILE DCB DSORG=PS,RECFM=VBS,MACRF=GM,+ DDNAME=INDD,EODAD=FINAL OUTFILE DCB DSORG=PS,RECFM=FB,LRECL=28,BLKSIZE=2800,MACRF=PM, + DDNAME=OUTDD OUTREC DS0CL28 BATA DSCL28 SAVEAREA DS18F LTORG INRECDS0F DATA DSCL28 DSCL32000 DSCL32000 DSCL32000 END XP1000
Re: Opening a Spanned File for Input Using Assembler
After you solve the open problem, you still need to load R13 with the address of your 18 word save area (required by GET and PUT). You define the area but you never load R13. Don't forget to restore R13 before issuing the RETURN macro. -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@bama.ua.edu] On Behalf Of Bruce Hunt Sent: Tuesday, March 08, 2011 8:43 AM To: IBM-MAIN@bama.ua.edu Subject: Opening a Spanned File for Input Using Assembler I an trying to read a spanned file that has a record organzation of PS, a record format of VBS, a record length of 1, a blocksize of 27998 as per the file attributes, and a possible real record length of 65535. But in trying to open tne file I get a SOC4. I am not the greatest Assembler coder but my program is pretty simple. I know it is abending on the open. Anyone have any ideas. My actual input records in the spanned file are header records that are 76 bytes, data records that are 136 bytes, and trailer records that are 28 bytes. Any help will be greatly appreciated. TITLE 'XP1000' * * 02/25/11 B HUNT CHANGED A SPANNED FILE TO A FIXED FILE * XP1000 AMODE 31 XP1000 RMODE ANY XP1000 START COPY EQUATES SAVE (14,12) SAVE REGISTERS 14 THRU 12 BASR BASE1,0 ESTABLISH ADDRESSABILITY USING *,BASE1 PROVIDE BASE ID WTO ' START XP1000',X ROUTCDE=(2),X DESC=(7) B BEGIN SPACE 1 DS0D DCCL8'XP1000' DCCL8'SYSDATE' DCCL8'SYSTIME' SPACE 1 BEGINDS0H WTO ' BEFORE OPEN',ROUTCDE=(2),DESC=(7) OPEN (INFILE,INPUT,OUTFILE,OUTPUT) LTR 15,15 BNZ BADOPEN WTO ' GOOD OPEN FILE',ROUTCDE=(2),DESC=(7) LOOP DS 0H GET INFILE,INREC WTO ' GOOD FILE READ',ROUTCDE=(2),DESC=(7) MVC BATA,DATA WTO ' GOOD MOVE',ROUTCDE=(2),DESC=(7) PUT OUTFILE,OUTREC WTO ' GOOD FILE WRITE',ROUTCDE=(2),DESC=(7) B LOOP FINAL DS 0H WTO ' BEFORE FILE CLOSE',ROUTCDE=(2),DESC=(7) CLOSE (INFILE,,OUTFILE) WTO ' GOOD FILE CLOSE',ROUTCDE=(2),DESC=(7) B C100 BADOPEN WTO ' UABLE TO OPEN FILE',ROUTCDE=(2),DESC=(7) B C100 BADREAD WTO ' READ UNSUCCESSFUL ',ROUTCDE=(2),DESC=(7) B C100 BADWRITE WTO ' WRITE UNSUCCESSFUL ',ROUTCDE=(2),DESC=(7) B C100 C100 DS0H RETURN (14,12)RESTORE REGISTERS AND RETURN INFILE DCB DSORG=PS,RECFM=VBS,MACRF=GM,+ DDNAME=INDD,EODAD=FINAL OUTFILE DCB DSORG=PS,RECFM=FB,LRECL=28,BLKSIZE=2800,MACRF=PM, + DDNAME=OUTDD OUTREC DS0CL28 BATA DSCL28 SAVEAREA DS18F LTORG INRECDS0F DATA DSCL28 DSCL32000 DSCL32000 DSCL32000 END XP1000 09.38.22 JOB33865 -JOBNAME STEPNAME PROCSTEPRC EXCP CONN TCBSRB 09.38.22 JOB33865 -ASMJCL RMS RMS@2X 00 31 8 551177.00 09.38.22 JOB33865 + START XP1000 09.38.22 JOB33865 + BEFORE OPEN 09.38.25 JOB33865 IEA995I SYMPTOM DUMP OUTPUT 742 742 SYSTEM COMPLETION CODE=0C4 REASON CODE=0010 742 TIME=09.38.22 SEQ=02516 CPU= ASID=0060 742 PSW AT TIME OF ERROR 078C1000 80D26522 ILC 4 INTC 10 742NO ACTIVE MODULE FOUND 742NAME=UNKNOWN 742DATA AT PSW 00D2651C - 56403DD6 0B049180 20324710 742GR 0: 00011000 1: 00D00060 742 2: 001E9184 3: 00D264D2 742 4: 80D26522 5: 008FDBC0 742 6: 00D264D0 7: 00FBD480 742 8: 0E14409E 9: 8AAE2D88 742 A: 008CBC8D B: 008FF048 742 C: 010D93C0 D: 6008 742 E: 90D26518 F: 008FF048 742 END OF SYMPTOM DUMP //ASMJCL JOB (DP,6010),'XX - HUNT ',CLASS=A,MSGCLASS=X, // MSGLEVEL=(1,1),NOTIFY=SYSUID //* //RMS EXEC CA11RMS,TYPRUN='F' //* //ASMEXEC EXEC PGM=XP1000,REGION=0M //STEPLIB DD DISP=SHR,DSN=TEST.LE.LOADLIB //INDD DD DISP=SHR,DSN=TEST.FONT.BACKUP, // DSORG=PS,LRECL=X,BLKSIZE=27998,RECFM=VBS //OUTDDDD DSN=TEST.FONT.BACKUP.FIXED, // DISP=(,CATLG,CATLG), // SPACE=(TRK,(1950,100),RLSE), // DCB=(LRECL=28,BLKSIZE=0,RECFM=FB) //SYSOUT DD SYSOUT=* //SYSDBOUT DD SYSOUT=* //SYSUDUMP DD SYSOUT=* // -- For IBM-MAIN
Re: Opening a Spanned File for Input Using Assembler
I tried BFTEK=A and DCB=BFTEK=A on my input file JCL and still got soc4's but thanks. -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@bama.ua.edu] On Behalf Of Rick Fochtman Sent: Tuesday, March 08, 2011 12:01 PM To: IBM-MAIN@bama.ua.edu Subject: Re: Opening a Spanned File for Input Using Assembler Adding the parameter BFTEK=A will cause the spanned records to be re-assembled during input processing, before they are handed to the application. Rick -- Bruce Hunt wrote: I an trying to read a spanned file that has a record organzation of PS, a record format of VBS, a record length of 1, a blocksize of 27998 as per the file attributes, and a possible real record length of 65535. But in trying to open tne file I get a SOC4. I am not the greatest Assembler coder but my program is pretty simple. I know it is abending on the open. Anyone have any ideas. My actual input records in the spanned file are header records that are 76 bytes, data records that are 136 bytes, and trailer records that are 28 bytes. Any help will be greatly appreciated. TITLE 'XP1000' * * 02/25/11 B HUNT CHANGED A SPANNED FILE TO A FIXED FILE * XP1000 AMODE 31 XP1000 RMODE ANY XP1000 START COPY EQUATES SAVE (14,12) SAVE REGISTERS 14 THRU 12 BASR BASE1,0 ESTABLISH ADDRESSABILITY USING *,BASE1 PROVIDE BASE ID WTO ' START XP1000',X ROUTCDE=(2),X DESC=(7) B BEGIN SPACE 1 DS0D DCCL8'XP1000' DCCL8'SYSDATE' DCCL8'SYSTIME' SPACE 1 BEGINDS0H WTO ' BEFORE OPEN',ROUTCDE=(2),DESC=(7) OPEN (INFILE,INPUT,OUTFILE,OUTPUT) LTR 15,15 BNZ BADOPEN WTO ' GOOD OPEN FILE',ROUTCDE=(2),DESC=(7) LOOP DS 0H GET INFILE,INREC WTO ' GOOD FILE READ',ROUTCDE=(2),DESC=(7) MVC BATA,DATA WTO ' GOOD MOVE',ROUTCDE=(2),DESC=(7) PUT OUTFILE,OUTREC WTO ' GOOD FILE WRITE',ROUTCDE=(2),DESC=(7) B LOOP FINAL DS 0H WTO ' BEFORE FILE CLOSE',ROUTCDE=(2),DESC=(7) CLOSE (INFILE,,OUTFILE) WTO ' GOOD FILE CLOSE',ROUTCDE=(2),DESC=(7) B C100 BADOPEN WTO ' UABLE TO OPEN FILE',ROUTCDE=(2),DESC=(7) B C100 BADREAD WTO ' READ UNSUCCESSFUL ',ROUTCDE=(2),DESC=(7) B C100 BADWRITE WTO ' WRITE UNSUCCESSFUL ',ROUTCDE=(2),DESC=(7) B C100 C100 DS0H RETURN (14,12)RESTORE REGISTERS AND RETURN INFILE DCB DSORG=PS,RECFM=VBS,MACRF=GM,+ DDNAME=INDD,EODAD=FINAL OUTFILE DCB DSORG=PS,RECFM=FB,LRECL=28,BLKSIZE=2800,MACRF=PM, + DDNAME=OUTDD OUTREC DS0CL28 BATA DSCL28 SAVEAREA DS18F LTORG
Re: Opening a Spanned File for Input Using Assembler
Does the load module linked with RM 24? Maybe it should be. -Original Message- From: Hunt, Bruce bruce.h...@trs.state.tx.us To: IBM-MAIN@bama.ua.edu Sent: Tue, Mar 8, 2011 2:08 pm Subject: Re: Opening a Spanned File for Input Using Assembler I tried BFTEK=A and DCB=BFTEK=A on my input file JCL and still got soc4's but hanks. -Original Message- rom: IBM Mainframe Discussion List [mailto:IBM-MAIN@bama.ua.edu] On Behalf Of ick Fochtman ent: Tuesday, March 08, 2011 12:01 PM o: IBM-MAIN@bama.ua.edu ubject: Re: Opening a Spanned File for Input Using Assembler Adding the parameter BFTEK=A will cause the spanned records to be e-assembled during input processing, before they are handed to the pplication. Rick - ruce Hunt wrote: I an trying to read a spanned file that has a record organzation of PS, a ecord format of VBS, a record length of 1, a blocksize of 27998 as per the file attributes, and a possible real record length of 65535. But in trying to open tne file I get a SOC4. I am not the greatest Assembler coder but my program is pretty simple. I know it is abending on the open. Anyone have any ideas. My actual input records in the spanned file are header records that are 76 bytes, data records that are 136 bytes, and trailer records that are 28 bytes. Any help will be greatly appreciated. TITLE 'XP1000' * * 02/25/11 B HUNT CHANGED A SPANNED FILE TO A FIXED FILE * XP1000 AMODE 31 XP1000 RMODE ANY XP1000 START COPY EQUATES SAVE (14,12) SAVE REGISTERS 14 THRU 12 BASR BASE1,0 ESTABLISH ADDRESSABILITY USING *,BASE1 PROVIDE BASE ID WTO ' START XP1000',X ROUTCDE=(2),X DESC=(7) B BEGIN SPACE 1 DS0D DCCL8'XP1000' DCCL8'SYSDATE' DCCL8'SYSTIME' SPACE 1 BEGINDS0H WTO ' BEFORE OPEN',ROUTCDE=(2),DESC=(7) OPEN (INFILE,INPUT,OUTFILE,OUTPUT) LTR 15,15 BNZ BADOPEN WTO ' GOOD OPEN FILE',ROUTCDE=(2),DESC=(7) LOOP DS 0H GET INFILE,INREC WTO ' GOOD FILE READ',ROUTCDE=(2),DESC=(7) MVC BATA,DATA WTO ' GOOD MOVE',ROUTCDE=(2),DESC=(7) PUT OUTFILE,OUTREC WTO ' GOOD FILE WRITE',ROUTCDE=(2),DESC=(7) B LOOP FINAL DS 0H WTO ' BEFORE FILE CLOSE',ROUTCDE=(2),DESC=(7) CLOSE (INFILE,,OUTFILE) WTO ' GOOD FILE CLOSE',ROUTCDE=(2),DESC=(7) B C100 BADOPEN WTO ' UABLE TO OPEN FILE',ROUTCDE=(2),DESC=(7) B C100 BADREAD WTO ' READ UNSUCCESSFUL ',ROUTCDE=(2),DESC=(7) B C100 BADWRITE WTO ' WRITE UNSUCCESSFUL ',ROUTCDE=(2),DESC=(7) B C100 C100 DS0H RETURN (14,12)RESTORE REGISTERS AND RETURN INFILE DCB DSORG=PS,RECFM=VBS,MACRF=GM,+ DDNAME=INDD,EODAD=FINAL OUTFILE DCB DSORG=PS,RECFM=FB,LRECL=28,BLKSIZE=2800,MACRF=PM, + DDNAME=OUTDD
Re: Opening a Spanned File for Input Using Assembler
Steve Comstock wrote: WTO ' BEFORE OPEN',ROUTCDE=(2),DESC=(7) OPEN (INFILE,INPUT,OUTFILE,OUTPUT) You need the open options to be in parentheses: OPEN (INFILE,(INPUT),OUTFILE,(OUTPUT)) No, you don't. It might (arguably) be good programming style to include the parentheses, but they are not required and the program will assemble just fine without them. Regards, Allen -- 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: Opening a Spanned File for Input Using Assembler
On 3/8/2011 3:13 PM, Gainsford, Allen wrote: Steve Comstock wrote: WTO ' BEFORE OPEN',ROUTCDE=(2),DESC=(7) OPEN (INFILE,INPUT,OUTFILE,OUTPUT) You need the open options to be in parentheses: OPEN (INFILE,(INPUT),OUTFILE,(OUTPUT)) No, you don't. It might (arguably) be good programming style to include the parentheses, but they are not required and the program will assemble just fine without them. Regards, Allen Yes, you're right. I was just comparing the OP's code to some code of mine and noticed that difference; I didn't go the doc with this one. -- Kind regards, -Steve Comstock The Trainer's Friend, Inc. 303-393-8716 http://www.trainersfriend.com * To get a good Return on your Investment, first make an investment! + Training your people is an excellent investment * Try our new tool for calculating your Return On Investment for training dollars at http://www.trainersfriend.com/ROI/roi.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: Opening a Spanned File for Input Using Assembler
Have you properly chained the save areas, as another poster pointed out? Rick Hunt, Bruce wrote: I tried BFTEK=A and DCB=BFTEK=A on my input file JCL and still got soc4's but thanks. -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@bama.ua.edu] On Behalf Of Rick Fochtman Sent: Tuesday, March 08, 2011 12:01 PM To: IBM-MAIN@bama.ua.edu Subject: Re: Opening a Spanned File for Input Using Assembler Adding the parameter BFTEK=A will cause the spanned records to be re-assembled during input processing, before they are handed to the application. Rick -- Bruce Hunt wrote: I an trying to read a spanned file that has a record organzation of PS, a record format of VBS, a record length of 1, a blocksize of 27998 as per the file attributes, and a possible real record length of 65535. But in trying to open tne file I get a SOC4. I am not the greatest Assembler coder but my program is pretty simple. I know it is abending on the open. Anyone have any ideas. My actual input records in the spanned file are header records that are 76 bytes, data records that are 136 bytes, and trailer records that are 28 bytes. Any help will be greatly appreciated. TITLE 'XP1000' * * 02/25/11 B HUNT CHANGED A SPANNED FILE TO A FIXED FILE * XP1000 AMODE 31 XP1000 RMODE ANY XP1000 START COPY EQUATES SAVE (14,12) SAVE REGISTERS 14 THRU 12 BASR BASE1,0 ESTABLISH ADDRESSABILITY USING *,BASE1 PROVIDE BASE ID WTO ' START XP1000',X ROUTCDE=(2),X DESC=(7) B BEGIN SPACE 1 DS0D DCCL8'XP1000' DCCL8'SYSDATE' DCCL8'SYSTIME' SPACE 1 BEGINDS0H WTO ' BEFORE OPEN',ROUTCDE=(2),DESC=(7) OPEN (INFILE,INPUT,OUTFILE,OUTPUT) LTR 15,15 BNZ BADOPEN WTO ' GOOD OPEN FILE',ROUTCDE=(2),DESC=(7) LOOP DS 0H GET INFILE,INREC WTO ' GOOD FILE READ',ROUTCDE=(2),DESC=(7) MVC BATA,DATA WTO ' GOOD MOVE',ROUTCDE=(2),DESC=(7) PUT OUTFILE,OUTREC WTO ' GOOD FILE WRITE',ROUTCDE=(2),DESC=(7) B LOOP FINAL DS 0H WTO ' BEFORE FILE CLOSE',ROUTCDE=(2),DESC=(7) CLOSE (INFILE,,OUTFILE) WTO ' GOOD FILE CLOSE',ROUTCDE=(2),DESC=(7) B C100 BADOPEN WTO ' UABLE TO OPEN FILE',ROUTCDE=(2),DESC=(7) B C100 BADREAD WTO ' READ UNSUCCESSFUL ',ROUTCDE=(2),DESC=(7) B C100 BADWRITE WTO ' WRITE UNSUCCESSFUL ',ROUTCDE=(2),DESC=(7) B C100 C100 DS0H RETURN (14,12)RESTORE REGISTERS AND RETURN INFILE DCB DSORG=PS,RECFM=VBS,MACRF=GM,+ DDNAME=INDD,EODAD=FINAL OUTFILE DCB DSORG=PS,RECFM=FB,LRECL=28,BLKSIZE=2800,MACRF=PM, + DDNAME=OUTDD OUTREC DS0CL28 BATA DSCL28 SAVEAREA
QSAM I/O and 31 bit was Re: Opening a Spanned File for Input Using Assembler
On 8 Mar 2011 09:55:50 -0800, in bit.listserv.ibm-main you wrote: On 3/8/2011 9:43 AM, Bruce Hunt wrote: I an trying to read a spanned file that has a record organzation of PS, a record format of VBS, a record length of 1, a blocksize of 27998 as per the file attributes, and a possible real record length of 65535. But in trying to open tne file I get a SOC4. I am not the greatest Assembler coder but my program is pretty simple. I know it is abending on the open. Anyone have any ideas. My actual input records in the spanned file are header records that are 76 bytes, data records that are 136 bytes, and trailer records that are 28 bytes. Any help will be greatly appreciated. Ngafei Huang's suggestion for AMODE 24 was spot on. If you want to get into using AMODE 31 for programs that do I/O, you could check out our free paper I/O and AMODE 31 at http://www.trainersfriend.com/Papers/amode_31_io.pdf I would like to see the ACB enhanced to handle all access methods and appropriate changes made so that ESDS data sets can be concatenated with QSAM data sets (including PDS/PDSE members). Since I am retired until someone offers me money and they can actually use my possibly out of date talents, this does not constitute a customer request. However it does express contempt for the idea that people have to fool around with 24/31 bit peculiarities in 2011 and that it will probably get worse with 64 bit. Lack of strategy strikes again. Clark Morris TITLE 'XP1000' * * 02/25/11 B HUNT CHANGED A SPANNED FILE TO A FIXED FILE * XP1000 AMODE 31 XP1000 RMODE ANY XP1000 START COPY EQUATES SAVE (14,12) SAVE REGISTERS 14 THRU 12 BASR BASE1,0 ESTABLISH ADDRESSABILITY USING *,BASE1 PROVIDE BASE ID WTO ' START XP1000',X ROUTCDE=(2),X DESC=(7) B BEGIN SPACE 1 DS0D DCCL8'XP1000' DCCL8'SYSDATE' DCCL8'SYSTIME' SPACE 1 BEGINDS0H WTO ' BEFORE OPEN',ROUTCDE=(2),DESC=(7) OPEN (INFILE,INPUT,OUTFILE,OUTPUT) LTR 15,15 BNZ BADOPEN WTO ' GOOD OPEN FILE',ROUTCDE=(2),DESC=(7) LOOP DS 0H GET INFILE,INREC WTO ' GOOD FILE READ',ROUTCDE=(2),DESC=(7) MVC BATA,DATA WTO ' GOOD MOVE',ROUTCDE=(2),DESC=(7) PUT OUTFILE,OUTREC WTO ' GOOD FILE WRITE',ROUTCDE=(2),DESC=(7) B LOOP FINAL DS 0H WTO ' BEFORE FILE CLOSE',ROUTCDE=(2),DESC=(7) CLOSE (INFILE,,OUTFILE) WTO ' GOOD FILE CLOSE',ROUTCDE=(2),DESC=(7) B C100 BADOPEN WTO ' UABLE TO OPEN FILE',ROUTCDE=(2),DESC=(7) B C100 BADREAD WTO ' READ UNSUCCESSFUL ',ROUTCDE=(2),DESC=(7) B C100 BADWRITE WTO ' WRITE UNSUCCESSFUL ',ROUTCDE=(2),DESC=(7) B C100 C100 DS0H RETURN (14,12)RESTORE REGISTERS AND RETURN INFILE DCB DSORG=PS,RECFM=VBS,MACRF=GM,+ DDNAME=INDD,EODAD=FINAL OUTFILE DCB DSORG=PS,RECFM=FB,LRECL=28,BLKSIZE=2800,MACRF=PM, + DDNAME=OUTDD OUTREC DS0CL28 BATA DSCL28 SAVEAREA DS18F LTORG INRECDS0F DATA DSCL28 DSCL32000 DSCL32000 DSCL32000 END XP1000 09.38.22 JOB33865 -JOBNAME STEPNAME PROCSTEPRC EXCP CONN TCBSRB 09.38.22 JOB33865 -ASMJCL RMS RMS@2X 00 31 8 551177.00 09.38.22 JOB33865 + START XP1000 09.38.22 JOB33865 + BEFORE OPEN 09.38.25 JOB33865 IEA995I SYMPTOM DUMP OUTPUT 742 742 SYSTEM COMPLETION CODE=0C4 REASON CODE=0010 742 TIME=09.38.22 SEQ=02516 CPU= ASID=0060 742 PSW AT TIME OF ERROR 078C1000 80D26522 ILC 4 INTC 10 742NO ACTIVE MODULE FOUND 742NAME=UNKNOWN 742DATA AT PSW 00D2651C - 56403DD6 0B049180 20324710 742GR 0: 00011000 1: 00D00060 742 2: 001E9184 3: 00D264D2 742 4: 80D26522 5: 008FDBC0 742 6: 00D264D0 7: 00FBD480 742 8: 0E14409E 9: 8AAE2D88 742 A: 008CBC8D B: 008FF048 742 C: 010D93C0 D: 6008 742 E: 90D26518 F: 008FF048 742 END OF SYMPTOM DUMP //ASMJCL JOB (DP,6010),'XX - HUNT ',CLASS=A,MSGCLASS=X, //