IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

VSAM File getting Spaced out in JCL


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
jagadeesanm87

New User


Joined: 20 Jan 2011
Posts: 14
Location: Mumbai, India

PostPosted: Mon Oct 17, 2011 10:57 am
Reply with quote

Hi all

My Scenario is like I am copying my Controlcard to my input VSAM file. Then i am CICSSTARTing my Program RP9Z420 which call few of the programs and in return again back in RP9Z420 Output VSAm file is populated. I have to Copy this VSAM in to PS file.

Steps Written in JCL:
Note : COMTSIN is an input VSAM file and COMTSOT is an output VSAM file. Both are ESDS.


1) CLOSE/DISABLE - COMTSIN AND COMTSOT.
2) DELETE INPUT FILE COMTSIN
3) DEFINE INPUT FILE COMTSIN
4) DELETE INPUT FILE COMTSOT
5) DEFINE INPUT FILE COMTSOT
6) COPY CONTROL CARD TO VSAM FILE COMTSIN
7) Triggering or CICSSTART 'Z400' transaction which calls RP9Z420.
8) CLOSE/ENABLE- COMTSIN AND COMTSOT
9) COPY VSAM OUTPUT FILE TO PS FILE (utility used IDCAMS)

Now Actual Problem is : Output is written in Output VSAM file COMTSOT i.e JCL works properly till Step 8 . But as soon as Step 9 is executed it abends with an error "VSAM OPEN RETURN CODE IS 160".

This is because COMTSOT file which acts as an input for Step 9 is empty. Now Actually it is populated with data till Step 8 but it gets spaced out at Step 9. Could not figure out why it is happening like this.

Now if I copy that Step 9 in another JCL and Step 1 to Step 8 in another JCl and run both the JCL individually I See PS file is populated with output and it does not abend. But if all steps are kept in one JCL and JCl is submitted it abends with returmn code 160.

Please Help. Do let me know if more details required.

Thanks
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Oct 17, 2011 11:56 am
Reply with quote

You need to give the full message from the "open" of the VSAM file in the ninth step, to see what the actual reason code is.

In your steps, how do the files get "open" in CICS?

We might need to see the JCL, but start with the full message please.
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Mon Oct 17, 2011 12:01 pm
Reply with quote

VSAM Open return Code 160 indicates that the file is empty. What do you mean by "spaced out"?

You don't have a OPEN/ENABLE between steps 6 and 7, so the Z400 task is likely to have an issue reading/writing the files (unless you explicitly coded OPEN/ENABLE in that task).

Garry.
Back to top
View user's profile Send private message
jagadeesanm87

New User


Joined: 20 Jan 2011
Posts: 14
Location: Mumbai, India

PostPosted: Mon Oct 17, 2011 2:16 pm
Reply with quote

@Bill : Please find attached txt file AXU04. This will tell you how i open my Vsam files. It also has entire JCL that i have used. Guess this would clearify my question.


@Garry : Sorry I used a wrong word "Spaced out". I actually mean empty. Till Step 8 output file has data in it. When it enters step 9 output file which now acts as an input for step S9 becomes empty.

I forgot to mentiion we have Close enable step in between Step 6 and Step 7. I tried with open enable too but made no difference.

Updated steps:

1) CLOSE/DISABLE - COMTSIN AND COMTSOT.
2) DELETE INPUT FILE COMTSIN
3) DEFINE INPUT FILE COMTSIN
4) DELETE INPUT FILE COMTSOT
5) DEFINE INPUT FILE COMTSOT
6) COPY CONTROL CARD TO VSAM FILE COMTSIN
6A) CLOSE/ENABLE- COMTSIN AND COMTSOT
7) Triggering or CICSSTART 'Z400' transaction which calls RP9Z420.
8) CLOSE/ENABLE- COMTSIN AND COMTSOT
9) COPY VSAM OUTPUT FILE TO PS FILE (utility used IDCAMS)

here is the entire JCL
Code:
//AXU04   JOB (BIT),'UPDATE A    ',
//*            TYPRUN=SCAN,
//*            RESTART=S9,
//             CLASS=M,MSGCLASS=X,NOTIFY=&SYSUID
//JOBLIB  DD  DSN=HMIC00PN.NDVR.SYST01.LOADLIB,DISP=SHR
//        DD  DSN=PROD.NDVR.LOADLIB,DISP=SHR
//**********************************************************************
//* S1  -  CLOSE/DISABLE  - COMTSIN AND COMTSOT                         
//**********************************************************************
//S1       EXEC PGM=SYSBV2,COND=(0,NE),
//             PARM='NN,HMVCICSB,HMVCICSB,HMVCICSB,SYSBM01-12'
//SYSEXEC  DD  DSN=SYSHVR.SYSBII.EXECLIB,DISP=SHR
//SYSBOUT  DD  SYSOUT=*
//SYSUDUMP DD  SYSOUT=*
//SYSBIN   DD  DSN=CORP00DN.AGCY.P111581.TEST(AXU04001),DISP=SHR
//*********************************************************************
//* S2  -  DELETE INPUT FILE COMTSIN                                   *
//**********************************************************************
//S2       EXEC PGM=IDCAMS,COND=(0,NE)                                 
//SYSPRINT DD  SYSOUT=*                                                 
//SYSIN    DD  DSN=HMIC00PN.NDVR.SYST01.CNTLLIB(AGCOMIND),DISP=SHR     
//*********************************************************************
//* S3  -  DEFINE INPUT FILE COMTSIN                                   *
//**********************************************************************
//S3       EXEC PGM=IDCAMS,COND=(0,NE)                                 
//SYSPRINT DD  SYSOUT=*                                                 
//SYSIN    DD  DSN=HMIC00PN.NDVR.SYST01.CNTLLIB(AGCOMINC),DISP=SHR     
//*********************************************************************
//* S4  -  DELETE INPUT FILE COMTSOT                                   *
//**********************************************************************
//S4       EXEC PGM=IDCAMS,COND=(0,NE)                                 
//SYSPRINT DD  SYSOUT=*                                                 
//SYSIN    DD  DSN=HMIC00PN.NDVR.SYST01.CNTLLIB(AGCOMOUD),DISP=SHR     
//*********************************************************************
//* S5  -  DEFINE INPUT FILE COMTSOT                                   *
//**********************************************************************
//S5       EXEC PGM=IDCAMS,COND=(0,NE)                                 
//SYSPRINT DD  SYSOUT=*                                                 
//SYSIN    DD  DSN=HMIC00PN.NDVR.SYST01.CNTLLIB(AGCOMOUC),DISP=SHR     
//*********************************************************************
//* S6   - COPY CONTROL CARD TO VSAM FILE COMTSIN                      *
//**********************************************************************
//S6       EXEC PGM=IDCAMS,COND=(0,NE)
//SYSIN    DD  DSN=HMIC00PN.NDVR.SYST01.CNTLLIB(ZZREPRO),DISP=SHR
//         DD  DSN=HMIC00PN.NDVR.SYST01.CNTLLIB(ZZM0NECN),DISP=SHR
//FILEIN   DD  DSN=CORP00DN.AGCY.P111581.TEST(TEST),DISP=SHR
//FILEOUT  DD  DSN=CORP00VV.AGCY.COMM.TESTIN.C,DISP=SHR
//SYSPRINT DD  SYSOUT=*
//        DD  DSN=PROD.NDVR.LOADLIB,DISP=SHR
//*********************************************************************
//*S7  -  CLOSE/ENABLE- COMTSIN AND COMTSOT                      *     
//**********************************************************************
//S7       EXEC PGM=SYSBV2,COND=(0,NE),
//             PARM='NN,HMVCICSB,HMVCICSB,HMVCICSB,SYSBM01-12'
//SYSEXEC  DD  DSN=SYS9.H-W.SYSBII.EXECLIB,DISP=SHR
//SYSBOUT  DD  SYSOUT=*
//SYSUDUMP DD  SYSOUT=*
//SYSBIN   DD  DSN=CORP00DN.AGCY.P111581.TEST(AXU04002),DISP=SHR
//*********************************************************************
//* S8  -  EXECUTE RP9Z420  -  CICSSTART 'Z400'                        *
//**********************************************************************
//S8       EXEC PGM=SYSBV2,COND=(0,NE),
//             PARM='NN,HMVCICS,SYSBM01-12'
//SYSEXEC  DD  DSN=SYS9.H-W.SYSBII.EXECLIB,DISP=SHR
//SYSBOUT  DD  SYSOUT=*
//SYSUDUMP DD  SYSOUT=*
//SYSBIN   DD  DSN=CORP00DN.AGCY.P111581.TEST(AXU04003),DISP=SHR
//**********************************************************************
//* S9  -  CLOSE/DISABLE - COMTSOT                                     
//**********************************************************************
//S9       EXEC PGM=SYSBV2,COND=(0,NE),
//             PARM='NN,HMVCICSB,HMVCICSB,HMVCICSB,SYSBM01-12'
//SYSEXEC  DD  DSN=SYSHVR.SYSBII.EXECLIB,DISP=SHR
//SYSBOUT  DD  SYSOUT=*
//SYSUDUMP DD  SYSOUT=*
//SYSBIN   DD  DSN=CORP00DN.AGCY.P111581.TEST(AXU04001),DISP=SHR
//**********************************************************************
//* S10 -  CLOSE/ENABLE- COMTSIN AND COMTSOT                      *     
//**********************************************************************
//S10      EXEC PGM=SYSBV2,COND=(0,NE),
//             PARM='NN,HMVCICSB,HMVCICSB,HMVCICSB,SYSBM01-12'
//SYSEXEC  DD  DSN=SYS9.H-W.SYSBII.EXECLIB,DISP=SHR
//SYSBOUT  DD  SYSOUT=*
//SYSUDUMP DD  SYSOUT=*
//SYSBIN   DD  DSN=CORP00DN.AGCY.P111581.TEST(AXU04002),DISP=SHR
//*********************************************************************
//*S11  - COPY VSAM OUTPUT FILE TO PS FILE                            *
//**********************************************************************
//S11      EXEC PGM=IDCAMS,COND=(0,NE)
//SYSIN    DD  DSN=HMIC00PN.NDVR.SYST01.CNTLLIB(ZZREPRO),DISP=SHR
//         DD  DSN=HMIC00PN.NDVR.SYST01.CNTLLIB(ZZM0NECN),DISP=SHR
//FILEIN   DD  DSN=CORP00VV.AGCY.COMM.TESTOUT.C,DISP=OLD
//**Note: CORP00VV.AGCY.COMM.TESTOUT.C is output VSAM File**//
//FILEOUT  DD  DSN=CORP00VN.AGCY.COMM.OUTPUT,DISP=SHR
//SYSPRINT DD  SYSOUT=*


*************************************************************************************************************************


Code for open/Clos:   AXU04001/2/3 does open close of input and output file

Code for AXU04001:

APPLID=ARG(1)                                                           
APPLID2=ARG(2)                                                         
APPLID3=ARG(3)                                                         
TERMS=ARG(4)                                                           
SAY 'CONNECT TO' APPLID 'AS' TERMS                                     
CALL CONNECT APPLID,TERMS                                               
IF RC \=0 THEN DO                                                       
   SAY 'ERROR:CICS' APPLID 'REGION IS NOT AVAILABLE.'                   
   EXIT 00                 /* SET RETURN CODE TO 00 */                 
   END                                                                 
ELSE DO      /* IF ANY RETURN CODE IS NOT 0 SET RC TO 08 & EXIT */     
   SAY 'SUCCESSFULLY CONNECTED TO' APPLID                               
   CALL CICSFC "CLOSE",   "COMTSIN"; IF RESULT \=0 THEN EXIT 08         
   CALL CICSFC "DISABLE", "COMTSIN"; IF RESULT \=0 THEN EXIT 08         
   CALL CICSFC "CLOSE",   "COMTSOT"; IF RESULT \=0 THEN EXIT 08         
   CALL CICSFC "DISABLE", "COMTSOT"; IF RESULT \=0 THEN EXIT 08         
   END                                                                 
CALL DISCONNECT                                                         
RETURN 00                /* SET RETURN CODE TO 00 */                   
 


attachment deleted and inlined with the code tags
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Mon Oct 17, 2011 2:29 pm
Reply with quote

Quote:
Till Step 8 output file has data in it.
How? Have you not deleted an defined the file in steps 4 and 5 ?

Please do not use attachments - not everyone can download them (when I try, I get unformatted text which wraps around making it almost impossible to read). Please use "code tags" .

Garry.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Oct 17, 2011 2:39 pm
Reply with quote

Probably not part of your problem, but...

Code:
//*********************************************************************
//* S6   - COPY CONTROL CARD TO VSAM FILE COMTSIN                      *
//**********************************************************************
//S6       EXEC PGM=IDCAMS,COND=(0,NE)
//SYSIN    DD  DSN=HMIC00PN.NDVR.SYST01.CNTLLIB(ZZREPRO),DISP=SHR
//         DD  DSN=HMIC00PN.NDVR.SYST01.CNTLLIB(ZZM0NECN),DISP=SHR
//FILEIN   DD  DSN=CORP00DN.AGCY.P111581.TEST(TEST),DISP=SHR
//FILEOUT  DD  DSN=CORP00VV.AGCY.COMM.TESTIN.C,DISP=SHR
//SYSPRINT DD  SYSOUT=*
//        DD  DSN=PROD.NDVR.LOADLIB,DISP=SHR


In the cunningly-named S6 step, you seem to concatenate a loadlib to the SYSPRINT DD. I've never done that, don't know what it'll do. Hopefully nothing or nothing bad.

EDIT: Presumably S7 is the OPEN/ENABLE, wrongly commented? Can you confirm/deny please?

FURTHER EDIT: If so to previous EDIT, then you are opening to CICS again in S10 (despite the comment again), which would cause the REPRO to fail. Note that the "160" isn't only "empty". What is the "reason code" given for the "160"?
Back to top
View user's profile Send private message
jagadeesanm87

New User


Joined: 20 Jan 2011
Posts: 14
Location: Mumbai, India

PostPosted: Mon Oct 17, 2011 2:53 pm
Reply with quote

@Gary : Here it is.

Code:

//AXU04   JOB (BIT),'UPDATE A    ',
//*            TYPRUN=SCAN,
//*            RESTART=S9,
//             CLASS=M,MSGCLASS=X,NOTIFY=&SYSUID
//JOBLIB  DD  DSN=HMIC00PN.NDVR.SYST01.LOADLIB,DISP=SHR
//        DD  DSN=PROD.NDVR.LOADLIB,DISP=SHR
//**********************************************************************
//* S1  -  CLOSE/DISABLE  - COMTSIN AND COMTSOT                         
//**********************************************************************
//S1       EXEC PGM=SYSBV2,COND=(0,NE),
//             PARM='NN,HMVCICSB,HMVCICSB,HMVCICSB,SYSBM01-12'
//SYSEXEC  DD  DSN=SYSHVR.SYSBII.EXECLIB,DISP=SHR
//SYSBOUT  DD  SYSOUT=*
//SYSUDUMP DD  SYSOUT=*
//SYSBIN   DD  DSN=CORP00DN.AGCY.P111581.TEST(AXU04001),DISP=SHR
//*********************************************************************
//* S2  -  DELETE INPUT FILE COMTSIN                                   *
//**********************************************************************
//S2       EXEC PGM=IDCAMS,COND=(0,NE)                                 
//SYSPRINT DD  SYSOUT=*                                                 
//SYSIN    DD  DSN=HMIC00PN.NDVR.SYST01.CNTLLIB(AGCOMIND),DISP=SHR     
//*********************************************************************
//* S3  -  DEFINE INPUT FILE COMTSIN                                   *
//**********************************************************************
//S3       EXEC PGM=IDCAMS,COND=(0,NE)                                 
//SYSPRINT DD  SYSOUT=*                                                 
//SYSIN    DD  DSN=HMIC00PN.NDVR.SYST01.CNTLLIB(AGCOMINC),DISP=SHR     
//*********************************************************************
//* S4  -  DELETE INPUT FILE COMTSOT                                   *
//**********************************************************************
//S4       EXEC PGM=IDCAMS,COND=(0,NE)                                 
//SYSPRINT DD  SYSOUT=*                                                 
//SYSIN    DD  DSN=HMIC00PN.NDVR.SYST01.CNTLLIB(AGCOMOUD),DISP=SHR     
//*********************************************************************
//* S5  -  DEFINE INPUT FILE COMTSOT                                   *
//**********************************************************************
//S5       EXEC PGM=IDCAMS,COND=(0,NE)                                 
//SYSPRINT DD  SYSOUT=*                                                 
//SYSIN    DD  DSN=HMIC00PN.NDVR.SYST01.CNTLLIB(AGCOMOUC),DISP=SHR     
//*********************************************************************
//* S6   - COPY CONTROL CARD TO VSAM FILE COMTSIN                      *
//**********************************************************************
//S6       EXEC PGM=IDCAMS,COND=(0,NE)
//SYSIN    DD  DSN=HMIC00PN.NDVR.SYST01.CNTLLIB(ZZREPRO),DISP=SHR
//         DD  DSN=HMIC00PN.NDVR.SYST01.CNTLLIB(ZZM0NECN),DISP=SHR
//FILEIN   DD  DSN=CORP00DN.AGCY.P111581.TEST(TEST),DISP=SHR
//FILEOUT  DD  DSN=CORP00VV.AGCY.COMM.TESTIN.C,DISP=SHR
//SYSPRINT DD  SYSOUT=*
//        DD  DSN=PROD.NDVR.LOADLIB,DISP=SHR
//*********************************************************************
//*S7  -  CLOSE/ENABLE- COMTSIN AND COMTSOT                      *     
//**********************************************************************
//S7       EXEC PGM=SYSBV2,COND=(0,NE),
//             PARM='NN,HMVCICSB,HMVCICSB,HMVCICSB,SYSBM01-12'
//SYSEXEC  DD  DSN=SYS9.H-W.SYSBII.EXECLIB,DISP=SHR
//SYSBOUT  DD  SYSOUT=*
//SYSUDUMP DD  SYSOUT=*
//SYSBIN   DD  DSN=CORP00DN.AGCY.P111581.TEST(AXU04002),DISP=SHR
//*********************************************************************
//* S8  -  EXECUTE RP9Z420  -  CICSSTART 'Z400'                        *
//**********************************************************************
//S8       EXEC PGM=SYSBV2,COND=(0,NE),
//             PARM='NN,HMVCICS,SYSBM01-12'
//SYSEXEC  DD  DSN=SYS9.H-W.SYSBII.EXECLIB,DISP=SHR
//SYSBOUT  DD  SYSOUT=*
//SYSUDUMP DD  SYSOUT=*
//SYSBIN   DD  DSN=CORP00DN.AGCY.P111581.TEST(AXU04003),DISP=SHR
//**********************************************************************
//* S9  -  CLOSE/DISABLE - COMTSOT                                     
//**********************************************************************
//S9       EXEC PGM=SYSBV2,COND=(0,NE),
//             PARM='NN,HMVCICSB,HMVCICSB,HMVCICSB,SYSBM01-12'
//SYSEXEC  DD  DSN=SYSHVR.SYSBII.EXECLIB,DISP=SHR
//SYSBOUT  DD  SYSOUT=*
//SYSUDUMP DD  SYSOUT=*
//SYSBIN   DD  DSN=CORP00DN.AGCY.P111581.TEST(AXU04001),DISP=SHR
//**********************************************************************
//* S10 -  CLOSE/ENABLE- COMTSIN AND COMTSOT                      *     
//**********************************************************************
//S10      EXEC PGM=SYSBV2,COND=(0,NE),
//             PARM='NN,HMVCICSB,HMVCICSB,HMVCICSB,SYSBM01-12'
//SYSEXEC  DD  DSN=SYS9.H-W.SYSBII.EXECLIB,DISP=SHR
//SYSBOUT  DD  SYSOUT=*
//SYSUDUMP DD  SYSOUT=*
//SYSBIN   DD  DSN=CORP00DN.AGCY.P111581.TEST(AXU04002),DISP=SHR
//*********************************************************************
//*S11  - COPY VSAM OUTPUT FILE TO PS FILE                            *
//**********************************************************************
//S11      EXEC PGM=IDCAMS,COND=(0,NE)
//SYSIN    DD  DSN=HMIC00PN.NDVR.SYST01.CNTLLIB(ZZREPRO),DISP=SHR
//         DD  DSN=HMIC00PN.NDVR.SYST01.CNTLLIB(ZZM0NECN),DISP=SHR
//FILEIN   DD  DSN=CORP00VV.AGCY.COMM.TESTOUT.C,DISP=OLD                 
//FILEOUT  DD  DSN=CORP00VN.AGCY.COMM.OUTPUT,DISP=SHR
//SYSPRINT DD  SYSOUT=*




@Bill:

Bill Step S6 works perfectly alright. COntrolcard is copied to input VSAM. Problem is with step where VSAM is copied to PS. here VSAM is empty which should not be. If I just remove that step and run a Jcl and check my output VSAM file it will have data in it.
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Mon Oct 17, 2011 2:58 pm
Reply with quote

Quote:
If I just remove that step and run a Jcl and check my output VSAM file it will have data in it.
What happens if you add an IDCAMS step to VERIFY the file before you copy?

gaRRy.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Oct 17, 2011 3:01 pm
Reply with quote

Quote:
Step S6 works perfectly alright. COntrolcard is copied to input VSAM. Problem is with step where VSAM is copied to PS. here VSAM is empty which should not be. If I just remove that step and run a Jcl and check my output VSAM file it will have data in it.


I suggested that S6 was not the problem, but it still has what I consider an "error" in it - concatenating a loadlib to a SYSOUT=* dataset.

If you can re-read my previous post (I edited it twice, so maybe you didn't get it all) can you provide the answers please?

EDIT: Bit about using the Code tags deleted, as a kind moderator has already expended their effort doing that for you. Next time, code tags yourself please.
Back to top
View user's profile Send private message
jagadeesanm87

New User


Joined: 20 Jan 2011
Posts: 14
Location: Mumbai, India

PostPosted: Mon Oct 17, 2011 3:21 pm
Reply with quote

@Bill :

No Bil it is not wrongly commented. It is CLose/Enable. We are Close enabling the input and output VSAM file here at step S7.

This is what i get in spool on submitting the Jcl

Code:

IDCAMS  SYSTEM SERVICES                             
                                                     
   REPRO   INFILE(FILEIN)-                           
           OUTFILE(FILEOUT)                         
IDC3300I  ERROR OPENING CORP00VV.AGCY.COMM.TESTOUT.C
IDC3351I ** VSAM OPEN RETURN CODE IS 160             
IDC0005I NUMBER OF RECORDS PROCESSED WAS 0           
IDC3003I FUNCTION TERMINATED. CONDITION CODE IS 12   



@garry:
Quote:
What happens if you add an IDCAMS step to VERIFY the file before you copy


Garry any step after S10 having output VSAm file as input for that step leads to error 160. So even Cant verify that. Hope I understood your question correct.

Most important: If I use that step S11 of JCL in another JCL and submit the job it works proper.data is copied to PS. Something is going wrong when it is used in same JCl.

Is it something like file not getting closed properly?
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Mon Oct 17, 2011 3:30 pm
Reply with quote

This is what I was suggesting...

Code:
/S10B      EXEC PGM=IDCAMS,COND=(0,NE)
//SYSIN    DD  *
  VERIFY FILE(FILEIN)
//FILEIN   DD  DSN=CORP00VV.AGCY.COMM.TESTOUT.C,DISP=OLD                 
//SYSPRINT DD  SYSOUT=*
//*
/S11      EXEC PGM=IDCAMS,COND=(0,NE)
//SYSIN    DD  DSN=HMIC00PN.NDVR.SYST01.CNTLLIB(ZZREPRO),DISP=SHR
//         DD  DSN=HMIC00PN.NDVR.SYST01.CNTLLIB(ZZM0NECN),DISP=SHR
//FILEIN   DD  DSN=CORP00VV.AGCY.COMM.TESTOUT.C,DISP=OLD                 
//**Note: CORP00VV.AGCY.COMM.TESTOUT.C is output VSAM File**//
//FILEOUT  DD  DSN=CORP00VN.AGCY.COMM.OUTPUT,DISP=SHR
//SYSPRINT DD  SYSOUT=*
Back to top
View user's profile Send private message
jagadeesanm87

New User


Joined: 20 Jan 2011
Posts: 14
Location: Mumbai, India

PostPosted: Mon Oct 17, 2011 3:52 pm
Reply with quote

@Gary:

I executed JCl including step S10B and I got following error message:

Code:

IDCAMS  SYSTEM SERVICES                                           T
                                                                   
  VERIFY FILE(FILEIN)                                             
IDC3302I  ACTION ERROR ON CORP00VV.AGCY.COMM.TESTOUT.C             
IDC3351I ** VSAM I/O RETURN CODE IS 116 - RPLFDBWD = X'B0080074'   
IDC3003I FUNCTION TERMINATED. CONDITION CODE IS 12                 


On Inquiring on net i found following explanation

"Attention message: the data set was not properly closed or was not opened. If the data set was not properly closed, then data may be lost if processing continues.

Gary we are closing our files in Step S10 but it still gives us this message.

This is what i have coded in AXU04002 of step S10

Code:

APPLID=ARG(1)                                                           
APPLID2=ARG(2)                                                         
APPLID3=ARG(3)                                                         
TERMS=ARG(4)                                                           
SAY 'CONNECT TO' APPLID 'AS' TERMS                                     
CALL CONNECT APPLID,TERMS                                               
IF RC \=0 THEN DO                                                       
   SAY 'ERROR:CICS' APPLID 'REGION IS NOT AVAILABLE.'                   
   EXIT 00                 /* SET RETURN CODE TO 00 */                 
   END                                                                 
ELSE DO      /* IF ANY RETURN CODE IS NOT 0 SET RC TO 08 & EXIT */     
   SAY 'SUCCESSFULLY CONNECTED TO' APPLID                               
   CALL CICSFC "CLOSE",   "COMTSIN"; IF RESULT \=0 THEN EXIT 08         
   CALL CICSFC "ENABLE",  "COMTSIN"; IF RESULT \=0 THEN EXIT 08         
   CALL CICSFC "CLOSE",    "COMTSOT"; IF RESULT \=0 THEN EXIT 08       
   CALL CICSFC "ENABLE",  "COMTSOT"; IF RESULT \=0 THEN EXIT 08         
   END                                                                 
CALL DISCONNECT                                                         
RETURN 00                /* SET RETURN CODE TO 00 */                   


Please do let me know whether i am closing it properly or not.

Thanks gary this discussion is leading us to some valid point.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Oct 17, 2011 3:57 pm
Reply with quote

Code:
//FILEIN   DD  DSN=CORP00VV.AGCY.COMM.TESTOUT.C,DISP=OLD 


Is this file supposed to be available to CICS? How is the DISP=OLD not keeping this job waiting on the input queue?

If S7 is not opening the file, back to an earlier question, what is?

Can you give us the sysout from the job? All the controls cards are nicely in PDSs, but that means we can't see them.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 0
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top