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
 

 

How to write a low-value record in KSDS using COBOL
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
rohitvw

New User


Joined: 04 Feb 2009
Posts: 12
Location: Chennai

PostPosted: Mon Feb 09, 2009 9:04 pm    Post subject: How to write a low-value record in KSDS using COBOL
Reply with quote

How we should write a low value record in KSDS using COBOL. In same program we are reading and deleting records from the respective KSDS file.

Please Help.

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

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Mon Feb 09, 2009 9:12 pm    Post subject:
Reply with quote

MOVE LOW-VALUES to FD 01 and write the record ... is there a particular problem you're having?
Back to top
View user's profile Send private message
rohitvw

New User


Joined: 04 Feb 2009
Posts: 12
Location: Chennai

PostPosted: Mon Feb 09, 2009 9:14 pm    Post subject: Reply to: How to write a low-value record in KSDS using COBO
Reply with quote

I am getting a logical error IGZ0003W. Thanks Robert for quick reply.
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Mon Feb 09, 2009 9:21 pm    Post subject: Re: Reply to: How to write a low-value record in KSDS using
Reply with quote

rohitvw wrote:
I am getting a logical error IGZ0003W. Thanks Robert for quick reply.
What is the associated code?
Please post it........
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Mon Feb 09, 2009 9:23 pm    Post subject:
Reply with quote

From the MAC:
Quote:
IGZ0003W
A logic error occurred for file file-name in program program-name at relative location relative-location.
Explanation:

This error is usually caused by an I/O operation request that is not valid for the fileā€”for example, a WRITE into a file opened for INPUT, or a START to a VSAM ESDS.

A file status clause was specified or an error declarative statement was active for the file.
Programmer response:

Check the operation request and modify the program.
System action:

No system action was taken.
Symbolic Feedback Code:

IGZ003
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Feb 09, 2009 9:25 pm    Post subject:
Reply with quote

Quote:

I am getting a logical error IGZ0003W


no, that is a logic error. your program sucks.
Back to top
View user's profile Send private message
rohitvw

New User


Joined: 04 Feb 2009
Posts: 12
Location: Chennai

PostPosted: Mon Feb 09, 2009 9:34 pm    Post subject:
Reply with quote

File Defination
SELECT OPTIONAL CLFILE ASSIGN TO FM27I02
ORGANIZATION IS INDEXED
RECORD KEY IS FILE-KEY-CL
FILE STATUS IS WB-CL-STATUS.
------------------------------------------------------------------
FD DECLARATION
FD CLFILE.

01 CL-RECORD.
COPY CLRECORD.
-------------------------------------------------------------------
I AM WRITING RECORD IN BELOW FASHION

MOVE LOW-VALUES TO CL-RECORD
WRITE CL-RECORD

BUT WRITE STATEMTMENT IS FAILING WITH IGZ0003W ERROR

PLEASE HELP.

THNAKS.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Mon Feb 09, 2009 9:38 pm    Post subject:
Reply with quote

Question 1: What does the OPEN look like -- since the error message I posted is pretty clear in saying the OPEN could be wrong.
Question 2: What is the file status code value? This can provide valuable data about the error.
Question 3: Since the file is optional, are you even sure it is in the JCL? If not, that could also explain why you're getting an error.
Back to top
View user's profile Send private message
rohitvw

New User


Joined: 04 Feb 2009
Posts: 12
Location: Chennai

PostPosted: Mon Feb 09, 2009 9:46 pm    Post subject:
Reply with quote

Open Look like
OPEN I-O CLFILE.

Dump is not showing the File status but showing the below error message
IGZ0003W A logic error occurred for file FM27IO02 in program FM27 at relative location X'0FAC'.

File is defined in JCL as below
//FM27I01 DD DSN=CLFILE,DISP=SHR,
// AMP=('ACCBIAS=SYSTEM')

Please Suggest. Thanks.
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Mon Feb 09, 2009 9:54 pm    Post subject: Reply to: How to write a low-value record in KSDS using COBO
Reply with quote

SELECT OPTIONAL CLFILE ASSIGN TO FM27I02

IGZ0003W A logic error occurred for file FM27IO02 in program FM27 at relative location X'0FAC'.

//FM27I01 DD ...

could the discrepancy in the bolded DD names be the problem?
Back to top
View user's profile Send private message
rohitvw

New User


Joined: 04 Feb 2009
Posts: 12
Location: Chennai

PostPosted: Mon Feb 09, 2009 10:00 pm    Post subject:
Reply with quote

No Actually I am just trying rerun the program by changing the file.

By mistake I gave the Dump for the run when file name is FM27I02 in both Cobol program and JCL.

So file is FM27I02 and correct error message is below
IGZ0003W A logic error occurred for file FM27I02 in program FM27 at relative location X'0FAC'.

Sorry for inconvience.

Thanks.

Plese Suggest.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Mon Feb 09, 2009 10:10 pm    Post subject:
Reply with quote

What is the file status code on the open -- put a display in to show it and let us know.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Mon Feb 09, 2009 10:17 pm    Post subject:
Reply with quote

Look at using and testing the FILE STATUS clause, data-name-8 after every OPEN/CLOSE/READ/WRITE.....
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Mon Feb 09, 2009 10:47 pm    Post subject:
Reply with quote

rohitvw wrote:
Open Look like
OPEN I-O CLFILE.


If the file is EMPTY (there aren't any friggin records), then you must OPEN the file for OUTPUT, WRITE a single LOW-VALUES record, CLOSE the file and you're done.

Give this a try....
Back to top
View user's profile Send private message
rohitvw

New User


Joined: 04 Feb 2009
Posts: 12
Location: Chennai

PostPosted: Tue Feb 10, 2009 2:00 pm    Post subject:
Reply with quote

Hi all.

Thanks for your replys.

Actually the file is not empty, it is having nearly 3000 records.

File status is not mentioned any ware in spool.

Please suggest.
Back to top
View user's profile Send private message
rohitvw

New User


Joined: 04 Feb 2009
Posts: 12
Location: Chennai

PostPosted: Tue Feb 10, 2009 2:13 pm    Post subject:
Reply with quote

FIle Status is 10 when I am trying to write the file
Back to top
View user's profile Send private message
rohitvw

New User


Joined: 04 Feb 2009
Posts: 12
Location: Chennai

PostPosted: Tue Feb 10, 2009 2:42 pm    Post subject:
Reply with quote

Is file status is 00 also than also same logical error(IGZ0003W) is coming
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Tue Feb 10, 2009 6:00 pm    Post subject:
Reply with quote

1. File status is captured by the program. YOU must display it or otherwise have it show up on some output. It will not magically appear in the spool.
2. If you don't check the file status on the open, change your program to do so. Now. Before you do anything else. And display the file status if not 00 or 97.
3. File status 10 occurs only on READ as it means you've hit the end of file. I vaguely remember seeing a 10 on a WRITE but only if the OPEN failed in some way -- see #1 above.
4. File status 10 with IGZ0003W would make sense if you're trying to read a file before writing to it.
5. You're not providing adequate data for debugging, forcing us to guess without adequate information. Cut and paste using BBCode the job output when you run it -- expanded JCL and messages from the system log. When you paste as a message the way you did your COBOL code, you leave stuff out that is critical (such as the actual OPEN statement you have for the file).
Back to top
View user's profile Send private message
rohitvw

New User


Joined: 04 Feb 2009
Posts: 12
Location: Chennai

PostPosted: Tue Feb 10, 2009 7:06 pm    Post subject:
Reply with quote

Hi Robert.

Thanks for you time and suggestions.

Actually program I need to code is a purge program, and after deleting all the necessary records I have to insert a Low value record if low value record is not available.

I have the file status check in program.

So after putting display for file status, i could see that file status is 10 as program already went through the complete file to delete neccesary records when I am trying write the file.

So I tried to write the file in begining of the program also when file status 00 but still it is giving the same error message IGZ0003W.

Could please let me know how to use BBCode and what exactly BBCode is.

Thanks.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Feb 10, 2009 7:15 pm    Post subject:
Reply with quote

http://ibmmainframes.com/faq.php?mode=bbcode
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 -> COBOL Programming All times are GMT + 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. RANDOM Function in COBOL swapnil781 COBOL Programming 2 Tue Nov 15, 2016 6:17 pm
No new posts How to update a portion of text in a ... Bill Woodger DFSORT/ICETOOL 25 Wed Nov 09, 2016 9:41 pm
No new posts Regarding COBOL Stored Procedure opti... selvamsrinivasan85 DB2 4 Fri Nov 04, 2016 8:57 pm
No new posts COBOL Version 6.1 Virendra Shambharkar COBOL Programming 5 Tue Nov 01, 2016 11:24 am
No new posts Cobol list of programs being called biswajit.dattagupta COBOL Programming 5 Tue Nov 01, 2016 2:10 am


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