Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

ESDS write problem

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: ESDS write problem
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

Senior Member


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

PostPosted: Thu Sep 03, 2009 1:28 pm    Post subject:
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10231
Location: italy

PostPosted: Thu Sep 03, 2009 2:04 pm    Post subject: Reply to: ESDS write problem
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    Post subject:
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    Post subject:
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: 7990
Location: Bellevue, IA

PostPosted: Thu Sep 03, 2009 4:48 pm    Post subject:
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    Post subject:
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    Post subject:
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

Senior Member


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

PostPosted: Mon Sep 07, 2009 3:51 pm    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Problem reading GTF trace output danik56 ABENDS & Debugging 7 Thu Mar 16, 2017 1:02 pm
No new posts CICS Question RE: Browse, Readnext an... moezbud CICS 7 Sun Mar 05, 2017 5:45 am
No new posts Write R1 and R2 to OP1 and R1 to OP2 bhaskar_kanteti DFSORT/ICETOOL 10 Fri Mar 03, 2017 11:18 am
No new posts Can you write 2 recs on SORTOUT when ... Sysaron DFSORT/ICETOOL 6 Thu Feb 23, 2017 12:07 am
No new posts ROUNDED Problem with COMPUTE statement shalem COBOL Programming 11 Thu Feb 09, 2017 8:16 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us