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: 6966
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 JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 pm
No new posts IMS region inactive - User abend code... gthmrj IMS DB/DC 5 Tue Mar 07, 2017 12:29 pm
No new posts CA Workload Automation event code help vinu78 CA Products 10 Wed Mar 01, 2017 10:05 am
No new posts SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm
No new posts MAX-RC 88 and Return code 606 in DFH0... lind sh CICS 2 Tue Jan 24, 2017 1:23 pm


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