IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

U0260 abend while passing data from IMS screen into pgm


IBM Mainframe Forums -> IMS DB/DC
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
t5590ag

Active User


Joined: 21 May 2009
Posts: 139
Location: United States

PostPosted: Wed Nov 18, 2009 11:35 pm
Reply with quote

this is not a subroutine. independent screen.yes, I have referred to the existing running elements. We code attribute part in both MID and MOD. As we have to pass data from IMS screen to this pgm and IMSIOPCB is in LINKAGE section we have the USING clause.This is my understanding.

I have enhanced several screens but this is a fresh one so there might be flaws.
Back to top
View user's profile Send private message
Sandy Zimmer

Active Member


Joined: 13 Jun 2007
Posts: 826
Location: Wilmington, DE

PostPosted: Thu Nov 19, 2009 12:13 am
Reply with quote

If you are not a subroutine - you should change to a real entry statement. You have attribute bytes indicated in your DFLD and added them in your output area.

This is how I always did it - I'll just do 1 field.

DAMT DFLD POS=(15,42),LTH=11,ATTR=(MOD,NUM)

in the MID
MFLD DAMT,LTH=11,JUST=R,FILL=C'0"
in the MOD
MFLD DAMT,LTH=13,ATTR=YES
Back to top
View user's profile Send private message
Sandy Zimmer

Active Member


Joined: 13 Jun 2007
Posts: 826
Location: Wilmington, DE

PostPosted: Thu Nov 19, 2009 12:24 am
Reply with quote

I just found this -

supportline.microfocus.com/Documentation/books/mx25sp1/imdbds.htm#u034
Back to top
View user's profile Send private message
t5590ag

Active User


Joined: 21 May 2009
Posts: 139
Location: United States

PostPosted: Thu Nov 19, 2009 12:55 pm
Reply with quote

I am open to making these changes Sandy, but can you pls let me know in what way do you think using an ENTRY statement is going to help me with, what I think is a length mismatch ?
Back to top
View user's profile Send private message
Sandy Zimmer

Active Member


Joined: 13 Jun 2007
Posts: 826
Location: Wilmington, DE

PostPosted: Thu Nov 19, 2009 4:25 pm
Reply with quote

Just tell me WHO or WHAT is talking to IMS? Procedure division using.... indicates that your program is not talking directly to IMS - you are a subroutine and the WHO or WHAT is talking to IMS. Do you have your very own transaction and PSB?

Add up the bytes in your working storage message and then add up the bytes in both your mid and your mod and compare them.
Back to top
View user's profile Send private message
t5590ag

Active User


Joined: 21 May 2009
Posts: 139
Location: United States

PostPosted: Thu Nov 19, 2009 4:29 pm
Reply with quote

yes Sandy, I have my own transaction and PSB. I'll verify the bytes again. What else do we need in between to connect to IMS ? I mean there might be some systems knowledge which I dont have.
Back to top
View user's profile Send private message
t5590ag

Active User


Joined: 21 May 2009
Posts: 139
Location: United States

PostPosted: Thu Nov 19, 2009 4:36 pm
Reply with quote

yes Sandy , they all are 157 [w/o the filler(1700),I have removed it] .
Back to top
View user's profile Send private message
Sandy Zimmer

Active Member


Joined: 13 Jun 2007
Posts: 826
Location: Wilmington, DE

PostPosted: Thu Nov 19, 2009 4:57 pm
Reply with quote

Take a look at your PSB - then compare that to your linkage - then your "entry" statement.
Back to top
View user's profile Send private message
Sandy Zimmer

Active Member


Joined: 13 Jun 2007
Posts: 826
Location: Wilmington, DE

PostPosted: Thu Nov 19, 2009 5:01 pm
Reply with quote

The ONLY time you use "procedure division using" in IMS is when you are a subroutine of something else. Change that to the normal "entry". IMS needs to talk to your process.

Normally if your MFS and your working storage screen areas do not match - you get garbage on your screen.
Back to top
View user's profile Send private message
t5590ag

Active User


Joined: 21 May 2009
Posts: 139
Location: United States

PostPosted: Thu Nov 19, 2009 5:07 pm
Reply with quote

right..but here my program is looping again and again, it keeps running on IMS system.and transaction keeps abending continuously as soon as I restart and unlock it. so nothing comes on my screen t anytime, not even the abend message. I can see that the pgm is getting triggered when I trigger the tran so doesnt that mean that IMS and cobol are linked. Here is the PSB-
Code:
*PANTRAN-JCL=PSB                           
*PANTRAN-OP1=P1800Y0I                     
       PRINT NOGEN                         
*******************************************
**  ALTERNATE IO PCB                       
*******************************************
       PCB     TYPE=TP,                   
               LTERM=M3270,ALTRESP=YES,   
               EXPRESS=YES                 
*                                         
       PCB     TYPE=TP,                   
               MODIFY=YES,                 
               EXPRESS=YES                 
*                                         
       PSBGEN  PSBNAME=P1800Y0I,           
               LANG=COBOL                 
       END                                 
Back to top
View user's profile Send private message
Sandy Zimmer

Active Member


Joined: 13 Jun 2007
Posts: 826
Location: Wilmington, DE

PostPosted: Thu Nov 19, 2009 5:16 pm
Reply with quote

Did you copy that PSB from someone? Did you code an "entry" statement?
Back to top
View user's profile Send private message
t5590ag

Active User


Joined: 21 May 2009
Posts: 139
Location: United States

PostPosted: Thu Nov 19, 2009 5:45 pm
Reply with quote

Sandy is this fine-
Code:
001950     PROCEDURE DIVISION.                             
001960               ENTRY 'DLITCBL' USING I-O-LTERM-PCB   
001970                                     ALT-LTERM-PCB-MTO
001980                                     ALT-LTERM-PCB-1 
001990          .                                                                               
Yes PSB is copied.
Back to top
View user's profile Send private message
Sandy Zimmer

Active Member


Joined: 13 Jun 2007
Posts: 826
Location: Wilmington, DE

PostPosted: Thu Nov 19, 2009 5:58 pm
Reply with quote

Looks fine. Do you perform a "get messages" loop until end-of-messages? What comes after your entry statement?
Back to top
View user's profile Send private message
t5590ag

Active User


Joined: 21 May 2009
Posts: 139
Location: United States

PostPosted: Thu Nov 19, 2009 6:28 pm
Reply with quote

After Entry-
Code:
002030      MAINLINE-PROCESS.                                   
002040                                                           
002050           PERFORM 0100-INITIALIZATION                     
002060                                                           
002070           PERFORM 0110-GET-INPUT-MSG UNTIL               
002080               I-O-LTERM-STATUS NOT =   SPACES             


Has anything to be added ? When am using entry my PCB is coming as invalid. PSB needs any changes?
Back to top
View user's profile Send private message
Sandy Zimmer

Active Member


Joined: 13 Jun 2007
Posts: 826
Location: Wilmington, DE

PostPosted: Thu Nov 19, 2009 6:41 pm
Reply with quote

PERFORM 0110-GET-INPUT-MSG UNTIL
I-O-LTERM-STATUS NOT = SPACES


You need to determine whether you have no more messages or something terrible happened. You always need to check for what you EXPECT to happen - like QC - or something awful in the system - like anything other than spaces or QC.
Back to top
View user's profile Send private message
t5590ag

Active User


Joined: 21 May 2009
Posts: 139
Location: United States

PostPosted: Thu Nov 19, 2009 6:45 pm
Reply with quote

yes Sandy, QC was there. I just skipped that condition, anyways I have to put it later. but if it abends at CBLTDLI call only then I dont even get a chance to check the status.
Back to top
View user's profile Send private message
t5590ag

Active User


Joined: 21 May 2009
Posts: 139
Location: United States

PostPosted: Thu Nov 19, 2009 6:55 pm
Reply with quote

Hello Sandy. I just gt it solved. The problem was with the function-codes include. It was placed in the linkage section. Should be in Working storage. When I went to debug it showed me that Function-GU itself is invalid...! Am thankful and sorry as well as I feel that this was time wasted over a stupid miss.
Back to top
View user's profile Send private message
Sandy Zimmer

Active Member


Joined: 13 Jun 2007
Posts: 826
Location: Wilmington, DE

PostPosted: Thu Nov 19, 2009 6:58 pm
Reply with quote

If you learned something - no time was wasted! The best way to learn is problem solving.
Back to top
View user's profile Send private message
t5590ag

Active User


Joined: 21 May 2009
Posts: 139
Location: United States

PostPosted: Thu Nov 19, 2009 7:06 pm
Reply with quote

right Sandy. But I still have that doubt with entry statement. why at that time was my PCB not read ? Though I'll check that again with the running code now and get back to you.
Back to top
View user's profile Send private message
Sandy Zimmer

Active Member


Joined: 13 Jun 2007
Posts: 826
Location: Wilmington, DE

PostPosted: Thu Nov 19, 2009 7:09 pm
Reply with quote

Can you scan your COBOL libraries and look for anything that has the "entry" statement? Then scan again looking for "procedure division using". If you are NOT a subroutine - you need the entry statement.
Back to top
View user's profile Send private message
t5590ag

Active User


Joined: 21 May 2009
Posts: 139
Location: United States

PostPosted: Thu Nov 19, 2009 7:14 pm
Reply with quote

Hmm.. I have a thought . If we transfer control from one screen to another using PF keys what would that need ? Procedure division using will be needed or its only for sybroutine thing ? Cos may be that the reason for using "Procedure Division USING". Is it a case?
Back to top
View user's profile Send private message
Sandy Zimmer

Active Member


Joined: 13 Jun 2007
Posts: 826
Location: Wilmington, DE

PostPosted: Thu Nov 19, 2009 7:14 pm
Reply with quote

In addition, when you are a subroutine in an IMS DC environment, you should not call your subroutine dynamically - too much overhead - you would link statically. I saw an installation that every IMS program was a subroutine of a "main" program. They linked statically, so everytime a change was made, they had to run THE BIG LINK to re-link everything. Look at your compile JCL. Their system ran like a turtle.
Back to top
View user's profile Send private message
Sandy Zimmer

Active Member


Joined: 13 Jun 2007
Posts: 826
Location: Wilmington, DE

PostPosted: Thu Nov 19, 2009 7:24 pm
Reply with quote

Hmm.. I have a thought . If we transfer control from one screen to another using PF keys what would that need ? Procedure division using will be needed or its only for sybroutine thing ? Cos may be that the reason for using "Procedure Division USING". Is it a case?


NO - I have processed as many as 10 screens - maybe more - in 1 COBOL program with 1 transaction and 1 PSB. When you get to that point, I will help you. Now, if you chose to process those screens as separate sub-routines - you would use procedure-division-using, but you would always have an ENTRY statement in the main program that retrieves your message.
Back to top
View user's profile Send private message
t5590ag

Active User


Joined: 21 May 2009
Posts: 139
Location: United States

PostPosted: Thu Nov 19, 2009 9:39 pm
Reply with quote

Now it worked Sandy I have assigned the task to other guy. But will you say that ims-cobol wont work with a procedure division using and without an entry statement ? cos entry didnt make any difference.I need to read abt these two.dont know about entry much.

10 screen with different layouts in single program ? am just trying to get how? Did you use the tran name or some other key field coming from screen to differentiate for which part of code to process ? but what about the MFS ? ok they should have different MFS I understand all pointing towards a single pgm but is that possible?
Back to top
View user's profile Send private message
Sandy Zimmer

Active Member


Joined: 13 Jun 2007
Posts: 826
Location: Wilmington, DE

PostPosted: Thu Nov 19, 2009 10:16 pm
Reply with quote

I used the same tran - same main program - from the main program user was able to select function. In my main program, I determined what they had selected and processed accordingly. I had several MFS - different names tied to the same transaction. It is possible - I did it!

You should read everything you can about HOW IMS works. Again - if you are NOT a subroutine - you NEED an entry statement.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> IMS DB/DC Goto page Previous  1, 2, 3  Next

 


Similar Topics
Topic Forum Replies
No new posts ABEND 0717 during starting IMS IMS DB/DC 0
No new posts db2 vs static data COBOL Programming 1
No new posts Passing containers on START command CICS 4
No new posts External data queue (changes?) CLIST & REXX 0
No new posts Pull data using date difference betwe... DB2 6
Search our Forums:

Back to Top