IGYGR0096-S - Severe error



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

IGYGR0096-S - Severe error

Postby xboss » Mon May 20, 2013 1:25 pm

I am trying to add instream records to KSDS file via COBOL program (should say learning), but having following issue. There should be some big misunderstanding the way I am trying to access the file as I am getting following error message,
000015                FD CUSTOMER-FILE-IN RECORDING MODE F.                 
000016                01 CUSTOMER-RECORD      PIC X(80).                     
000017                                                                       
000018                FD MASTER-FILE-OUT RECORDING MODE F.                   
                                                                             
000018==> IGYGR0096-S A "RECORDING MODE" clause was found for a file that did not have physical
                      "SEQUENTIAL" organization.  The "RECORDING MODE" clause was discarded.                                                                           

My complete code is
//STEP01   EXEC PGM=IDCAMS,REGION=4096K           
//SYSPRINT DD SYSOUT=A                           
//SYSIN    DD *                                   
  DELETE (XXXXXXXX.YYYYYYYY.ZZZZZZZZ)             
/*                                               
//STEP02   EXEC PGM=IDCAMS,REGION=4096K           
//SYSPRINT DD SYSOUT=A                           
//SYSIN    DD *                                   
 DEFINE CLUSTER(NAME(XXXXXXXX.YYYYYYYY.ZZZZZZZZ)- 
          RECORDSIZE(80 80)-                     
          KEYS(5 0)-                             
          FREESPACE(20 10)-                       
          SHAREOPTIONS(2 3))-                     
        DATA(NAME(XXXXXXXX.YYYYYYYY.ZZZZZZZZ.DATA)-
          CYLINDERS(20 10)-                         
          CISZ(4096))-                             
        INDEX(NAME(XXXXXXXX.YYYYYYYY.ZZZZZZZZ.INDEX))
/*                                                 
//STEP3 EXEC IGYWCLG,REGION=50M                     
//COBOL.SYSIN DD *                                 
       IDENTIFICATION DIVISION.                                     
       ENVIRONMENT DIVISION.                       
       INPUT-OUTPUT SECTION.                       
       FILE-CONTROL.                               
            SELECT FILE-IN ASSIGN TO INDD.
            SELECT FILE-OUT ASSIGN TO OUTDD 
                 ORGANIZATION IS INDEXED           
                 ACCESS IS SEQUENTIAL               
                 RECORD KEY IS ACCT-OUT.
       DATA DIVISION.                           
       FILE SECTION.                             
       FD FILE-IN RECORDING MODE F.     
       01 CUSTOMER-RECORD      PIC X(80).       
                                                 
       FD FILE-OUT RECORDING MODE F.     
       01RECORD-OUT.                     
          02 ACCT-OUT PIC X(5).         
          02 NAME-OUT PIC X(20).       
          02 ADDR-OUT PIC X(40).       
          02 BAL-OUT PIC 9(5)V99.   
          02 CREDIT     PIC X(8).     
                                                 
       WORKING-STORAGE SECTION.                 
       01 RECORD-IN.                   
          02 NUM       PIC X(5).                             
          02 NAME     PIC X(20).                     
          02 ADDR     PIC X(40).                     
          02 BALANCE PIC 9(5)V99.                 
          02 CREDITED  PIC X(8).                   
                                                               
       01 EOF  PIC X(3) VALUE "NO".                           
                                                               
       PROCEDURE DIVISION.                                     
            OPEN INPUT FILE-IN OUTPUT FILE-OUT.
            PERFORM UNTIL EOF = "YES"                         
               READ FILE-IN INTO RECORD-IN   
                       AT END MOVE "YES" TO EOF               
               NOT AT END PERFORM CREATE-INDEX-FILE   
               END-READ                                       
            END-PERFORM.                                       
            CLOSE FILE-IN, FILE-OUT.           
            STOP RUN.                                                   
                                                                       
       CREATE-INDEX-FILE.                                       
            WRITE RECORD-OUT FROM RECORD-IN             
                INVALID KEY DISPLAY "INVALID RECORD: "                 
                RECORD-IN.                                       
//INDD        DD *                                                     
10001KKKKKKKKKK          XXXXXXXXXXXXXXXXXX                      9999900AAAAAAAA
10005MMMMMM              YYYYYYYYYYYYYYYYYY                      1111100BBBBBBBB
10010LLLLLLLLLLLL        ZZZZZZZZZZZZZZZZZZ                      4444444CCCCCCCC
/*                                                                     
//GO.SYSOUT   DD SYSOUT=*                                               
//GO.SYSUDUMP DD SYSOUT=A                                               
//GO.OUTDD    DD DSN=xxxxxxxx.yyyyyyyy.zzzzzzzz,DISP=OLD                 
//                                                                     
xboss
 
Posts: 79
Joined: Mon Nov 29, 2010 10:55 am
Has thanked: 0 time
Been thanked: 0 time

Re: IGYGR0096-S - Severe error

 

Re: IGYGR0096-S - Severe error

Postby BillyBoyo » Mon May 20, 2013 2:06 pm

So drop the RECORDING MODE.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: IGYGR0096-S - Severe error

Postby Robert Sample » Mon May 20, 2013 3:00 pm

Yes, I would have to agree that you have a BIG misunderstanding. Form the COBOL Language Reference manual 5.2.10 on RECORDING MODE:
The RECORDING MODE clause specifies the format of the physical records in a QSAM file.
So why would you specify a clause that is explicitly for QSAM (sequential) files for a VSAM file?
Robert Sample
Global moderator
 
Posts: 3378
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 225 times

Re: IGYGR0096-S - Severe error

Postby dick scherrer » Mon May 20, 2013 8:21 pm

Hello,

Possibly the first time with VSAM and cloned a program that accessed QSAM data . . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: IGYGR0096-S - Severe error

Postby xboss » Mon May 20, 2013 10:33 pm

Thanks guys for your response. Yes, this is my first time working with COBOL and VSAM together. If I drop recording mode, job fails with following message code,
IGZ0035S There was an unsuccessful OPEN or CLOSE of file INDD in program PROGRAM at relative location X'04F6'.
         Neither FILE STATUS nor an ERROR declarative were specified. The status was 35.
         From compile unit PROGRAM at entry point PROGRAM at compile unit offsset +000004F6 at entry offset +000004F6
          at address 20300C8E.                                                 
xboss
 
Posts: 79
Joined: Mon Nov 29, 2010 10:55 am
Has thanked: 0 time
Been thanked: 0 time

Re: IGYGR0096-S - Severe error

Postby Robert Sample » Mon May 20, 2013 10:46 pm

The file status codes are given in 6.1.8.9.1 of the COBOL Language Reference manual, which you can access by clicking the IBM Manuals link on the top right of this page, then clicking the manual name. File status 35 means
An OPEN statement with the INPUT, I-O, or EXTEND phrase was attempted on a nonoptional file that was unavailable.
so either you did not provide the appropriate DD name for your VSAM file, or you put the DD name in the wrong place in the JCL, or ....

In this case, you did not specify //GO.INDD -- just //INDD -- so the DD statement is NOT associated with the GO step. Which step it is associated with can be determined by looking at the job output.
Robert Sample
Global moderator
 
Posts: 3378
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 225 times

Re: IGYGR0096-S - Severe error

Postby Akatsukami » Mon May 20, 2013 10:56 pm

Robert Sample wrote:The file status codes are given in 6.1.8.9.1 of the COBOL Language Reference manual, which you can access by clicking the IBM Manuals link on the top right of this page, then clicking the manual name. File status 35 means
An OPEN statement with the INPUT, I-O, or EXTEND phrase was attempted on a nonoptional file that was unavailable.
so either you did not provide the appropriate DD name for your VSAM file, or you put the DD name in the wrong place in the JCL, or ....

We note that the unqualified DD statement INDD is placed immediately after COBOL.SYSIN, and is an instream data set. This cannot possibly work. Qualify the DD name with "GO", and either have it and FILE-IN specify the VSAM data set or an instream data set, but both the same type of data set.
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1054
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: IGYGR0096-S - Severe error

Postby xboss » Tue May 21, 2013 2:01 am

Got it guys, thanks for your responses.
xboss
 
Posts: 79
Joined: Mon Nov 29, 2010 10:55 am
Has thanked: 0 time
Been thanked: 0 time


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post