Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 6968
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 How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
No new posts Accessing CICS tran with map from JCL... navdeepaggarwal CICS 5 Tue Oct 03, 2017 6:15 pm
No new posts Speed-up/reduce CPU use of code prino PL/I & Assembler 0 Tue Sep 26, 2017 12:05 am
This topic is locked: you cannot edit posts or make replies. how to code for GDG in Rexx cvnlynn CLIST & REXX 13 Wed Aug 09, 2017 9:13 pm
This topic is locked: you cannot edit posts or make replies. rexx code to create a ps file Bharath Vikraman CLIST & REXX 4 Mon Aug 07, 2017 10:30 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us