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
 

 

PROGRAM INTERRUPT - CODE 4

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products
View previous topic :: :: View next topic  
Author Message
PRV

New User


Joined: 16 Apr 2009
Posts: 15
Location: Pune

PostPosted: Wed Apr 22, 2009 4:04 pm    Post subject: PROGRAM INTERRUPT - CODE 4
Reply with quote

Code:
FILE FILE01 VB (10566 21136)         
SV 1 5 P. CM 6 8 P.               
LTR 265 2 P. IS 267 10296 A.     
                                     
*WORKING STORAGE                     
 HN W 10296 A.         
 H1 HN 104 A OCCURS (99) INDEX IDX1.
 HC H1 +6 3 A.                       
CTR W 2 P.                           
                                     
FILE FILE02 FB (25 2500)             
FCTR 1 2 N.                           
FD 3 9 A.                           
FM 12 14 A.                       
*                                     
JOB INPUT FILE01                     
    HN = IS                     
    IDX1 = 0                         
    CTR = 1                           
      DO WHILE CTR LE LTR           
               DISPLAY 'LTR :' LTR   
               DISPLAY 'CM:' CM 
               DISPLAY 'FD:' FD     
                  FCTR = LTR         
                  FM = CM       
                  FD = SV           
                PUT FILE02             
                CTR = CTR + 1         
            IDX1 = IDX1 + 104         
      END-DO                           
    GOTO JOB                           
**************************** Bottom of


I am getting error message
*******A006 PROGRAM INTERRUPT - CODE 4 (PROTECTION EXCP)
at line HN = IS

Please help me to remove this error
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


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

PostPosted: Wed Apr 22, 2009 4:47 pm    Post subject:
Reply with quote

i am not sure, but in most languages, if you assign a register,
Code:
H1 HN 104 A OCCURS (99) INDEX IDX1

you increment OCCURances which internally determines the displacement
Code:
IDX1 = IDX1 + 104

my guess would be to change the above to:
Code:
IDX1 = IDX1 + 1
Back to top
View user's profile Send private message
PRV

New User


Joined: 16 Apr 2009
Posts: 15
Location: Pune

PostPosted: Wed Apr 22, 2009 5:16 pm    Post subject: Reply to: PROGRAM INTERRUPT - CODE 4
Reply with quote

I tried ...still I am getting same error message.
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 Apr 22, 2009 8:35 pm    Post subject:
Reply with quote

Hello,

I suspect that your code is trying to move more bytes than exist. . .

The file is specified to be variable, but the move is fixed for the max length. . .
Back to top
View user's profile Send private message
PRV

New User


Joined: 16 Apr 2009
Posts: 15
Location: Pune

PostPosted: Fri Apr 24, 2009 12:03 pm    Post subject: Reply to: PROGRAM INTERRUPT - CODE 4
Reply with quote

Yes...That is true.

is there any way to move variable length field in the variable length working storage variable..
If yes...how would be the declaration of woring storage variable.

Please advice.

Thanks..
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: Fri Apr 24, 2009 7:16 pm    Post subject:
Reply with quote

Hello,

Quote:
is there any way to move variable length field in the variable length working storage variable..
Certainly - but you have to provide the definition that describes the file. We probably can't help with that. . .

It may be that the array should be defined in the Easytrieve file layout.

How does a cobol copybook for this file defined? The Easytrieve layout needs to be the same.
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 -> CA Products All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Job failing with USER = 4093 REASON C... Pradeepa S ABENDS & Debugging 1 Wed May 17, 2017 3:35 pm
No new posts IMS T-Pipe queue counts in a COBOL Pr... Siva NKK Kothamasu IMS DB/DC 0 Tue May 09, 2017 6:31 pm
No new posts COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am
No new posts Cobol upgrade - source code missing f... gthmrj IBM Tools 1 Wed Apr 26, 2017 6:04 pm
No new posts Need help in REXX CALL program Raje1002 CLIST & REXX 5 Wed Apr 19, 2017 11:18 pm


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