Alternate Record Key



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

Re: Alternate Record Key

Postby sambit_92 » Mon Nov 03, 2014 12:45 pm

Thanks for the reply Robert,

I have also tried doing that, but still I am not able to get the VSAM file opened. This VSAM file has an alternate record, its been mapped to that with the help of a file. Is there any other method for dealing with such clusters and paths??

As of now, I am getting this as O/P

IN INIT PARA
IN OPEN PARA
   VSAM-CODE-DISPLAY
   RETURN: 00
   COMPONENT:0
   REASON: 000
   ERROR IN OPENING THE IN1 FILE: 35
IN END PARA


I am struck at this for too long! Sorry, but now its a cry for help!
sambit_92
 
Posts: 9
Joined: Mon Sep 15, 2014 12:40 pm
Has thanked: 4 times
Been thanked: 0 time

Re: Re: Alternate Record Key

 

Re: Alternate Record Key

Postby Robert Sample » Mon Nov 03, 2014 5:30 pm

You need to post the JCL you are using -- at a minimum. The file status 35 means a DD statement was not found for a particular file. If this
   VSAM-CODE-DISPLAY
   RETURN: 00
   COMPONENT:0
   REASON: 000
are your extended file status values, then the file that has the problem is NOT the VSAM data set.
Robert Sample
Global moderator
 
Posts: 3367
Joined: Sat Dec 19, 2009 8:32 pm
Location: East Dubuque, Illinois
Has thanked: 1 time
Been thanked: 222 times

Re: Alternate Record Key

Postby sambit_92 » Mon Nov 03, 2014 6:31 pm

Hi Robert,
The below is the exact codes for my JCL. Please have a look once and kindly let me know if you see any thing wrong, or anything can be done ina better way
//SAMPLE4 JOB (DFB0000,EBS),CLASS=H,MSGCLASS=X,MSGLEVEL=(1,1),
// NOTIFY=&SYSUID
//PARMLIB  INCLUDE MEMBER=#PARMLIB
//JOBLIB   INCLUDE MEMBER=#JOBLIB
//*
//         INCLUDE MEMBER=IDFSINIL
//*
//*---------------------------------------------------------
//* DELETE DATASETS
//*---------------------------------------------------------
//STEP010  EXEC PGM=IEFBR14
//DD01     DD  DSN=SAMPLE.OUTPUT1.R100,
//         DISP=(MOD,DELETE,DELETE),
//         SPACE=(TRK,0)
//DD02     DD  DSN=SAMPLE.SPOOL.R100,
//         DISP=(MOD,DELETE,DELETE),
//         SPACE=(TRK,0)
//*---------------------------------------------------------
//STEP020  EXEC PGM=SAMPLPGM,COND=(0,NE)
//PGMLIST  INCLUDE MEMBER=IDFINC99
//IN1         DD DSN=SAMPLE.ALTKSD,DISP=SHR
//IN2         DD DSN=SAMPLE.INPUT1.R100,DISP=SHR
//IN11        DD DSN=SAMPLE.ALTKSD.PATH,DISP=SHR
//OUT1        DD DSN=SAMPLE.OUTPUT1.R100,
//            DISP=(NEW,CATLG,DELETE),
//            DCB=(RECFM=FB,LRECL=65,BLKSIZE=0),
//            UNIT=SYSDA,
//            SPACE=(TRK,(15,40),RLSE)
//PRNTFIL1 DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSOUT   DD DSN=SAMPLE.SPOOL.R100,
//            DISP=(MOD,CATLG,CATLG),
//            DCB=(RECFM=FB,LRECL=133,BLKSIZE=0),
//            UNIT=SYSDA,
//            SPACE=(TRK,(15,40),RLSE)
//SYSUDUMP DD SYSOUT=*
//SYSSNAP  DD SYSOUT=*
//*



thanks a ton for giving your time & concern!
sambit_92
 
Posts: 9
Joined: Mon Sep 15, 2014 12:40 pm
Has thanked: 4 times
Been thanked: 0 time

Re: Alternate Record Key

Postby Terry Heinze » Mon Nov 03, 2014 8:17 pm

We also need to see your SELECT statement, your FD information, and the COBOL statements leading up to your error. Oops, I see you've already shown your SELECT on your 1st post. A LISTCAT and your record layout would help also.
.... Terry
Terry Heinze
 
Posts: 193
Joined: Wed Dec 04, 2013 11:08 pm
Location: Richfield, MN, USA
Has thanked: 10 times
Been thanked: 11 times

Re: Alternate Record Key

Postby Robert Sample » Tue Nov 04, 2014 4:14 am

Please tell me that SAMPLE.ALTKSD is the base cluster name and not the name of the alternate index cluster -- if not, make this change and run the job again. When using an alternate index in a COBOL program, the IN1 DD statement (as you posted previously with your SELECT statement) points to the BASE cluster just as if there were no alternate index defined. And IN11 DD name will point to the path for the alternate index, which appears to be set up correctly. If you had a second alternate index, IN12 would point to the path for that alternate index -- but IN1 would still point to the base cluster.
Robert Sample
Global moderator
 
Posts: 3367
Joined: Sat Dec 19, 2009 8:32 pm
Location: East Dubuque, Illinois
Has thanked: 1 time
Been thanked: 222 times

Re: Alternate Record Key

Postby sambit_92 » Wed Nov 05, 2014 10:24 am

Yes, Robert, it is exactly that way.
For double check I the info of the file in FILE-AID

Cluster : SAMPLE.ALTKSD
Data : SAMPLE.ALTKSD.DATA
Index : SAMPLE.ALTKSD.INDEX

Related Datasets : SAMPLE.ALTKSD
Cluster : SAMPLE.ALTKSD
Alt Index : SAMPLE.ALTKSD1
Path : SAMPLE.ALTKSD.PATH
sambit_92
 
Posts: 9
Joined: Mon Sep 15, 2014 12:40 pm
Has thanked: 4 times
Been thanked: 0 time

Re: Alternate Record Key

Postby sambit_92 » Mon Dec 22, 2014 6:58 pm

Hi all,

It will be great if some one can come up with a solution for this issue.
I would sincerely appreciate the help.

I know this is not that big a issue, and I might well never get to face this kind of scenario, in practical life. But still knowing the solution matters a lot now.

Thanks in advance!
Best Regards,
Sambit
sambit_92
 
Posts: 9
Joined: Mon Sep 15, 2014 12:40 pm
Has thanked: 4 times
Been thanked: 0 time

Re: Alternate Record Key

Postby Robert Sample » Mon Dec 22, 2014 7:21 pm

You were asked to provide the code being used -- as long as you do not do so, there is no chance anyone on this forum can help you. A file status 35 is very specific -- you are attempting to open a file that does not have a DD name present and the file is not OPTIONAL. Hence, either your JCL is missing DD names or your SELECT statements do not match the JCL DD names. Without seeing JCL and the matching COBOL code there is not much more we can say here.
Robert Sample
Global moderator
 
Posts: 3367
Joined: Sat Dec 19, 2009 8:32 pm
Location: East Dubuque, Illinois
Has thanked: 1 time
Been thanked: 222 times

Previous

Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post