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

ESDS write problem


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

New User


Joined: 11 Jun 2009
Posts: 60
Location: Chennai

PostPosted: Thu Sep 03, 2009 11:03 am
Reply with quote

Hi all,


I could try my level best to write a record into a ESDS file. But it is writing perfectly in Non-vsam file.


In FILE-CONTROL used to write in Non-VSAM file:

Code:

002800     SELECT REP-FILE               ASSIGN TO REPFILE              00330000
010708                                   ORGANIZATION IS SEQUENTIAL     00340000
010709                                   ACCESS IS SEQUENTIAL           00350000
010711                                   FILE STATUS IS W04-RP-STATUS.  00360000



and in FD i used:

Code:

009100 FD  REP-FILE                                                     00650000
009200     LABEL RECORDS   ARE STANDARD                                 00660000
009300     BLOCK CONTAINS  0 CHARACTERS                                 00670000
009400     RECORD CONTAINS 133 CHARACTERS                               00680000
009500     RECORDING MODE  IS F                                         00690000
009600     DATA RECORD IS  REP-REC.                                     00700000
009700 01  REP-REC                                PIC X(133).           00710000





Is any modification need for the above code while i use ESDS file?
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Sep 03, 2009 1:28 pm
Reply with quote

If the file is a VSAM ESDS, your COBOL SELECT statement must be in the form
Code:
ASSIGN TO <comment>-AS-<ddname>
Please add that and try again.

Quote:
I could try my level best to write a record into a ESDS file. But it is writing perfectly in Non-vsam file
What happend you try to write with ESDS, any error message?
Back to top
View user's profile Send private message
sakthisiga
Warnings : 1

New User


Joined: 11 Jun 2009
Posts: 60
Location: Chennai

PostPosted: Thu Sep 03, 2009 1:53 pm
Reply with quote

I got the following error:

Code:

 IGZ0200W  : A file attribute mismatch was detected. File INP-FILE in program SAMPLE  was defined as a physical sequential file and the file specified in the ASSIGN clause was a VSAM data set.

 CEE3204S The system detected a protection exception (System Completion Code=0C4).
           From compile unit SAMPLE at entry point SAMPLE at compile unit offset +000007B2 at entry offset +000007B2 at address 09300BC2.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Sep 03, 2009 2:04 pm
Reply with quote

why do You have two threads going on with the same issue... ?

read the cobol manual to understand the difference between a PS file and a VSAM file

Quote:
IGZ0200W : A file attribute mismatch was detected. File INP-FILE in program SAMPLE was defined as a physical sequential file and the file specified in the ASSIGN clause was a VSAM data set.


the message could not be more clear
as already pointed out in the other thread define properly the file
Back to top
View user's profile Send private message
sakthisiga
Warnings : 1

New User


Joined: 11 Jun 2009
Posts: 60
Location: Chennai

PostPosted: Thu Sep 03, 2009 4:22 pm
Reply with quote

I tried enrico sorichetti...


Its not working..


Is any changes i have to do in the above mention description?
Back to top
View user's profile Send private message
himanshu7

Active User


Joined: 28 Aug 2007
Posts: 131
Location: At Desk

PostPosted: Thu Sep 03, 2009 4:35 pm
Reply with quote

Hi,

Code:
002800     SELECT REP-FILE               ASSIGN TO REPFILE              00330000
010708                                   ORGANIZATION IS SEQUENTIAL     00340000
010709                                   ACCESS IS SEQUENTIAL           00350000
010711                                   FILE STATUS IS W04-RP-STATUS.  00360000


Please change Assign clause to AS-REPFILE as Anuj said.

Code:
002800     SELECT REP-FILE               ASSIGN TO AS-REPFILE              00330000
010708                                   ORGANIZATION IS SEQUENTIAL     00340000
010709                                   ACCESS IS SEQUENTIAL           00350000
010711                                   FILE STATUS IS W04-RP-STATUS.  00360000
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Sep 03, 2009 4:48 pm
Reply with quote

Problem 1: your sample code refers to REP-FILE yet your error message refers to INP-FILE. Don't give us what you think we want to know, post the actual, real live code or don't expect a whole lot of help -- we cannot read your mind and know which file you're referring to.

Problem 2: the error message indicates that COBOL believes the file to be a VSAM ESDS file yet the file pointed to by the DD statement is not a VSAM ESDS. You can change your COBOL program, or you can change your file -- your choice.
Back to top
View user's profile Send private message
sakthisiga
Warnings : 1

New User


Joined: 11 Jun 2009
Posts: 60
Location: Chennai

PostPosted: Thu Sep 03, 2009 5:30 pm
Reply with quote

Thanks for your help himanshu7....



Its working now...
Back to top
View user's profile Send private message
sakthisiga
Warnings : 1

New User


Joined: 11 Jun 2009
Posts: 60
Location: Chennai

PostPosted: Thu Sep 03, 2009 5:54 pm
Reply with quote

Thanks for your advice Robert sample.

Reason for problem 1: After taking the COBOL code out, i just changed my COBOL code from REP-FILE to INP-FILE. after that i compiled and ran that.. that it was not work, then only i took the spool error message.

I apologizes for the mistake I done to wasted your time....

Reason for Problem 2: In DD statement the file given is ESDS file only... after getting idea from himanshu7, i changed my program.... and now its working...
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Mon Sep 07, 2009 3:51 pm
Reply with quote

aaarghhhh....

sakthisiga wrote:
After taking the COBOL code out, i just changed my COBOL code from REP-FILE to INP-FILE. after that i compiled and ran that..
How would I, for one, know this? I tell you one truth... I'm just an IT-Application-Engineer though 'am from Electronics and Instrumentation background and there in my college I exprimented a lot with actuators and sensors -- but could never succeed to read a mind, trust me.

Quote:
Reason for Problem 2: In DD statement the file given is ESDS file only... after getting idea from himanshu7, i changed my program.... and now its working...
Please be honest -- did you ever bothered to read the very first response in this thread for your query?
Back to top
View user's profile Send private message
sakthisiga
Warnings : 1

New User


Joined: 11 Jun 2009
Posts: 60
Location: Chennai

PostPosted: Tue Sep 08, 2009 12:31 pm
Reply with quote

Sorry Anuj Dhawan.....


I can't able to understand the syntax you specified in your first post. But your help was also very usefull for me, because i came to know that sytanx from uir first post itself...
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 Write line by line from two files DFSORT/ICETOOL 7
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts Random read in ESDS file by using RBA JCL & VSAM 6
This topic is locked: you cannot edit posts or make replies. How To Write, Compile and Execute Cob... COBOL Programming 5
No new posts Compare two files with a key and writ... SYNCSORT 3
Search our Forums:

Back to Top