Re: AIX COBOL ASSIGN error.
- From: "William M. Klein" <wmklein@xxxxxxxxxxxxxxxxxxxx>
- Date: Sun, 26 Jul 2009 23:35:50 -0500
Define the file as "sequential" (not LINE SEQUENTIAL in the Select/Assign clause
and put a full path name in quotes in the ASSIGN TO clause. See if this works.
If it does, and you want to use environment variables / EXPORT (like JCL on
mainframe), then I think you will need to do some more modifications, but first
find out if you can process the file as record sequential by using the name in
quotes.
NOTE WELL:
If this file really IS "line sequential" (not record sequential), then this
will cause different problems. How was the file created for you? If you used a
"text editor" or even a download from a mainframe, then I would guess that it is
line sequential. However, if you are absolutely Positive that the only CR's
within the file are actual data bytes, then records sequential is what you want
to get to.
--
Bill Klein
wmklein <at> ix.netcom.com
"gaya3" <gayathri.kalyanasundaram@xxxxxxxxx> wrote in message
news:7fb48fce-09f4-4278-8552-aac0b1f37e35@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Jul 25, 1:10 pm, "William M. Klein" <wmkl...@xxxxxxxxxxxxxxxxxxxx>
wrote:
When you say that records include CR, do you mean that you have 80 bytes of
data (already) and - for example - the 49th byte might be a "CR" that should
be
treated AS DATA (possibly in a COMP field).
OR
are you saying that if the 49th byte is a CR, that you want to treat the first
48 bytes as data and want to treat the record as those 48 bytes plus (for an
80
byte record) the next 32 bytes are spaces?
If you have records that ARE 80 bytes but include CR as data within records,
then you are correct, that you need to define this as "record sequential".
If you currently have LINE SEQUENTIAL (with variable amounts of data in each
record) and want to "pad" it with spaces, then you can do this with a READ
INTO
with putting it into an 80-byte working-storage item. The system will "pad"
each record with spaces. In this case, you may want to (probably should)
define
your input with the VARYING IN SIZE phrase (as well as defining it as LINE
SEQUENTIAL).
****
I don't think you have told us if you are an experienced COBOL programmer who
is
new to AIX - or if you are new to COBOL and AIX. Some of your questions sound
like you may be new to COBOL, but if you aren't, then tell us what compiler
and
Operating System you are used to - and we may be able to help you more.
NOTE:
You still have NOT confirmed that you are using the IBM compiler on AIX and
not some other AIX compiler. You also haven't confirmed that you have the
Language Reference and Programming Guide for which I previously sent the URL.
If you don't have those books yet, I would suggest that you get them. The PG
really does have pretty useful information on it - especially if you are used
to
COBOL on another platform.
--
Bill Klein
wmklein <at> ix.netcom.com"gaya3" <gayathri.kalyanasunda...@xxxxxxxxx> wrote
in message
news:de4f994d-fdd2-4f1b-a10d-22defc3aa694@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Jul 24, 4:15 pm, "Pete Dashwood"
<dashw...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
gaya3 wrote:
On Jul 23, 11:59 am, "Pete Dashwood"
<dashw...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
gaya3 wrote:
Hi All,
I have just started writing my first COBOL in AIX environment.
My COBOL code is as follows :
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
FILE-CONTROL.
SELECT FILECOBV ASSIGN TO FILE1.
--------- Rest of the Code..
I have set the environment variable FILE1 as below.
export FILE1=filename
I have also tried giving
export FILE1=~/correct-path/filename
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
I am getting the following error whenever i execute the code:
IWZ200S Error detected during OPEN for file 'FILECOBV'. File status
is: 35.
File system indicated: File Not Found.
Message routine called from offset 0x38 of routine
iwzWriteERRmsg.
iwzWriteERRmsg called from offset 0x574 of routine
_iwzCallUseProc.
_iwzCallUseProc called from offset 0x1538 of routine
_iwzSeqOpen.
_iwzSeqOpen called from offset 0x2ec of routine
_iwzGenericOpen.
_iwzGenericOpen called from offset 0x458 of routine TESTPGM.
IWZ901S Program exits due to severe or critical error.
=========================================================================
Could someone please tell me the solution for this..
Thanks in advance..!
Try this (assuming FILECOBV is NOT VSAM...)
select FILECOBV assign EVFILE1
export EVFILE1-STL-EVFILE1= <insert the path and filename here>
If it IS VSAM you must set the export as: export EVFILE1-VSA-EVFILE1=
<insert the path and filename here>
Please write it exactly as shown, including the case. If it works,
try substituting FILE1 for EVFILE1
Let us know how you get on.
Pete.
--
"I used to write COBOL...now I can do anything."- Hide quoted text -
- Show quoted text -
Hi Pete,
One more thing which i would to tell here is that ,
If i specify the file organization as LINE SEQUENTIAL,
the file is opened and processed..
Whereas, When i give the file organization as SEQUENTIAL,
I get the runtime error stated in this post..!!!!!!!!!!
Ah, my suggestion was based on the assumption that IS Line Sequential and it
appears to have worked. That's a relief... :-)
As the file obviously IS Line Sequential, why not process it as that?
Are you not sure what Line Sequential means?
BTW, I think, for a first effort, your code is not bad at all. Well done!
Pete.
--
"I used to write COBOL...now I can do anything."- Hide quoted text -
- Show quoted text -
Thank you for your feedback Pete..
My input file contains Carriage returns and i want read past the
carriage returns..
For Eg,
If the file's every record contains 80 bytes, and 49th byte is a CR,
If i specify the file org to be LINE SEQUENTIAL, the record that is
read is only upto 49th byte..
I want to read all the 80 bytes.
What should i do to read all the 80 bytes..
How do I convert a file from line sequential to sequential to process
as stated above.
Is there any way outta this..
thnx..- Hide quoted text -
- Show quoted text -
Bill Klien .. Thank you for the comprehensive reply..
"If you have records that ARE 80 bytes but include CR as data within
records,
then you are correct, that you need to define this as "record
sequential". "
The above is what i need.. CR is a data and i want to read past CR..
That is, if,
record length is 80 bytes..
CR is at 49th byte ..
50th-80th byte is some data..
Then , i want to read 1 to 80 th byte as data by itself..
When i specify line sequential, the pgm reads the record only upto
49th byte..
---------------------------------------------------------------------------------
I just know the basics of MVS COBOL.. and I am completely new to COBOL
on AIX platform.
---------------------------------------------------------------------------------
Als, I am using IBM AIX compiler..
I compile by giving the command.. -- cob2 filename.cbl
---------------------------------------------------------------------------------
I have the programmer's guide and language manual..
http://publib.boulder.ibm.com/infocenter/comphelp/v7v91/index.jsp?topic=/com.ibm.aix.cbl.doc/tpclr19a.htm
---------------------------------------------------------------------------------
:(
thank you for the reply once again.. :(
....
.
- Follow-Ups:
- Re: AIX COBOL ASSIGN error.
- From: gaya3
- Re: AIX COBOL ASSIGN error.
- References:
- AIX COBOL ASSIGN error.
- From: gaya3
- Re: AIX COBOL ASSIGN error.
- From: Pete Dashwood
- Re: AIX COBOL ASSIGN error.
- From: gaya3
- Re: AIX COBOL ASSIGN error.
- From: Pete Dashwood
- Re: AIX COBOL ASSIGN error.
- From: gaya3
- Re: AIX COBOL ASSIGN error.
- From: William M. Klein
- Re: AIX COBOL ASSIGN error.
- From: gaya3
- AIX COBOL ASSIGN error.
- Prev by Date: Re: AIX COBOL ASSIGN error.
- Next by Date: Re: AIX COBOL ASSIGN error.
- Previous by thread: Re: AIX COBOL ASSIGN error.
- Next by thread: Re: AIX COBOL ASSIGN error.
- Index(es):
Relevant Pages
|