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
 

 

OS/VS Cobol - Reading a variable length file - regd.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
ravi_chella2000

New User


Joined: 18 Dec 2006
Posts: 8
Location: India

PostPosted: Mon Dec 18, 2006 8:28 pm    Post subject: OS/VS Cobol - Reading a variable length file - regd.
Reply with quote

How can variable length files be handled in OS/VS cobol?
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 Dec 18, 2006 9:24 pm    Post subject:
Reply with quote

Multiple length 01s or a variable length 01 under the FD.
Back to top
View user's profile Send private message
Sahoo

New User


Joined: 08 Jun 2006
Posts: 53

PostPosted: Mon Dec 18, 2006 11:10 pm    Post subject: Re: OS/VS Cobol - Reading a variable length file - regd.
Reply with quote

The actual problem is given below:

Program Name : ABC

Select abc assign to abcfile
Recording mode is V
block contains 0 records
Record contains 2036 characters
Data Record is abc-record
FD abc-Record PIC X(2036)

....

Linkage section
01 REC-area PIC X(2036)

Procedure division using REC-AREA

READ abc

Move abc-Record to REC-AREA
...

The JCL is like this..

mainpgm is the main program. ABC programs called by Mainpgm

Step01 EXEC PGM=Mainpgm
Abcfile DD DSN=INFILE1,DISP=SHR
DD DSN=INFILE2,DISP=ShR


When this program executes in Non LE, thsi runs fine.. But when it executes in LE it fails with S0C4. The statement that fails after processing some records is the Move statement...

What is the soultion for this...

We tried with the options given by you.But it does not work..
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 Dec 18, 2006 11:24 pm    Post subject:
Reply with quote

So this is not about reading VB files, but moving data to linkage in a called program and the differences between a non-LE and an LE environment, correct?
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Dec 18, 2006 11:24 pm    Post subject:
Reply with quote

Hello,

Is this a called module?
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 Dec 18, 2006 11:36 pm    Post subject:
Reply with quote

My first guess (not an LE expert but used to play one at my last job...grin...) might be that the storage locations might not be compatable?
Maybe if the calling prog addresses above the line while the sub does it below, wouldn't that be a s0c4?
Comparing the AMODEs might point out a problem.....
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Dec 19, 2006 12:08 am    Post subject:
Reply with quote

Sorry about the previous question - i misread the original post.

Both programs have been recompiled LE? Do they use the same compile jcl?

Would you include the "CALL" from mainpgm?
Back to top
View user's profile Send private message
ravi_chella2000

New User


Joined: 18 Dec 2006
Posts: 8
Location: India

PostPosted: Tue Dec 19, 2006 9:37 am    Post subject: Re: OS/VS Cobol - Reading a variable length file - regd.
Reply with quote

AMODE and RMODE is not the problem. Because it processes some records from the input file...

You can see the RUn JCL.. The input file is a concatenation of INFILE1 and INFILE2...
When we copy both INFILE1 and INFILE2 ton INFILE3 and give only INFILE3 as input, it goes fine...

Yes.. All the modules are compiled in LE.. ABC is a called module from main program.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


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

PostPosted: Tue Dec 19, 2006 3:04 pm    Post subject:
Reply with quote

Stange.....
Maybe it's time to look at the dump.
Back to top
View user's profile Send private message
Sahoo

New User


Joined: 08 Jun 2006
Posts: 53

PostPosted: Tue Dec 19, 2006 3:15 pm    Post subject: Re: OS/VS Cobol - Reading a variable length file - regd.
Reply with quote

Let me know what type of dump and how to get that dump you require..
Back to top
View user's profile Send private message
William Thompson

Global Moderator


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

PostPosted: Tue Dec 19, 2006 3:44 pm    Post subject: Re: OS/VS Cobol - Reading a variable length file - regd.
Reply with quote

Sahoo wrote:
Let me know what type of dump and how to get that dump you require..

The s0c4 produces a dump you require.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Dec 19, 2006 8:24 pm    Post subject:
Reply with quote

Hmmmm,

If you reverst the concatenation and run a test with INFILE2 first and INFILE1 second does the abend still occur?

From the processing that is done before the abend, can you tell if the abend occurs when the first input ends/second input begins?
Back to top
View user's profile Send private message
Sahoo

New User


Joined: 08 Jun 2006
Posts: 53

PostPosted: Wed Dec 20, 2006 7:59 am    Post subject: Re: OS/VS Cobol - Reading a variable length file - regd.
Reply with quote

Yes.. it completes first input file...It reads some records from the second input file..

If you change the concatenation order... Same thing happens...
Back to top
View user's profile Send private message
ravi_chella2000

New User


Joined: 18 Dec 2006
Posts: 8
Location: India

PostPosted: Wed Dec 20, 2006 12:24 pm    Post subject: Re: OS/VS Cobol - Reading a variable length file - regd.
Reply with quote

SOC4 dump that was sought.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Dec 20, 2006 10:22 pm    Post subject:
Reply with quote

Hello,

Quote:
Yes.. it completes first input file...It reads some records from the second input file..


Is the abend in or at the end of the first block in the second file?

Could you post the CALL from mainpgm as well as the "REC-AREA" definition from mainpgm?

Is "REC-AREA" in mainpgm near or at the end of WORKING STORAGE? If it is, you might try with a 20k filler behind it.

It sounds like some of storage got "walked on" when the "open" for the second file occurred.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


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

PostPosted: Wed Dec 20, 2006 11:50 pm    Post subject:
Reply with quote

Code:
A storage reference exception occurred during execution of program PCRFYE14. The expected completion code is S0C4.
******************************************* * Analysis of Error * *******************************************
The system completion code of 0C4 is issued when the program attempts to use storage that is not accessible.
*** List of Probable 0C4 Causes ***
- Missing or incorrect DD statement
- Check system messages from abending step.
- Tried to reference record area before file opened.
- Indexing or subscripting outside defined limits.
- Linkage section incorrectly placed or omitted.
- Linkage section referenced without coding using clause on 'PROCEDURE DIVISION' or 'ENTRY' statement.
- Mismatched parameter list between calling program and subroutine.
- STOP RUN or GOBACK used in sort input procedure or output procedure.
- PERFORM or GOTO outside of section from sort input procedure or output procedure.
The IBM message that corresponds to the condition is:
CEE3204S The system detected a protection exception (System Completion Code=0C4). ******************************************* * Error Location * *******************************************
The next sequential instruction to be executed in program PCRFYE14 was at displacement 0000073C.
The program was compiled on 18 DEC 2006 and is 000009E8 bytes long.
It is part of load module PCRCD801.
The module was loaded from JOBLIB library K9900P.STGT@Y.DISP.#001350.NLB .
The module was link edited on 18 DEC 2006 and is 000181D8 bytes long.


Interesting, a newly compiled version?
You have the displacement, take a look.
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
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Full Time COBOL Software Development ... shally Mainframe Jobs 0 Fri Jan 20, 2017 5:24 am
This topic is locked: you cannot edit posts or make replies. COBOL Software Development Lead at Fi... shally Mainframe Jobs 0 Fri Jan 20, 2017 5:21 am
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
No new posts OO COBOL compile error Virendra Shambharkar COBOL Programming 3 Tue Jan 10, 2017 6:05 pm


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