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

IMS Calls to be made to go thru all the fields


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

New User


Joined: 07 Feb 2007
Posts: 22
Location: hyderabad

PostPosted: Thu Feb 15, 2007 12:19 pm
Reply with quote

1) How to go through the following DB in IMS.

1 SOURCE-1
2 SOURCE-2
2 SOURCE-3
2 SOURCE-4
3 SOURCE-5
2 SOURCE-6

IN THE ABOVE FORMAT, 3 SOURCE-5 HAS 2 OCCURANCES.

WHAT CALLS ARE TO BE MADE TO GO THROUGH ALL THE FILEDS OF ALL SEGMENTS.

2) WHEN I TRIED TO MAKE A GU CALL FOR SOURCE-1.I GOT AN 'AD' ABEND. WHAT COULD BE THE REASONS FOR THE ABEND?
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Thu Feb 15, 2007 12:26 pm
Reply with quote

Hi there,

Do u want to get all the segments .

One way is to give a first GU call for root segment key then give GN call until end of database

GU ( root key = 'abc') ----> it will give u source1
GN -------------------------> it will give u source2
GN -------------------------> it will give u source3
GN -------------------------> it will give u source4
GN -------------------------> it will give u source5(first occurrence)
GN -------------------------> it will give u source5(second occurrence)
GN -------------------------> it will give u source6
GN -------------------------> it will give u status code GB

Hope it will helpful
Back to top
View user's profile Send private message
srikar tenali

New User


Joined: 07 Feb 2007
Posts: 22
Location: hyderabad

PostPosted: Thu Feb 15, 2007 1:46 pm
Reply with quote

THANK YOU FOR THE REPLY.

BUT I'M GETTING THE STATUS CODE AS 'AD'(SORRY, I GAVE IT AS ABEND IN THE POST)

WHAT COULD BE THE REASON FOR THIS.
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Thu Feb 15, 2007 1:57 pm
Reply with quote

Hi There,

In which call u r getting AD
Please paste ur code.
Back to top
View user's profile Send private message
srikar tenali

New User


Joined: 07 Feb 2007
Posts: 22
Location: hyderabad

PostPosted: Thu Feb 15, 2007 3:09 pm
Reply with quote

HI,
HERE IS THE CODE.
WHEN TRYING TO DISPLAY THE STATUS CODE AFTER THE CALL
IT IS GIVING AS 'AD'

Code:
*DECLARATION OF SSA
     $SO SEG SOURCE1-SSA  STATUS=STDPROD;                       
                                                            EJECT
*DECLARATION OF I/O AREA
     $SO SEG SOURCE1-SEG PFX=SRC- STATUS=STDPROD;               
                                                            EJECT
 LINKAGE SECTION.                                                 
*DECLARATION OF PCBMASK                                                                 
     $SO SEG   PCBMASK    STATUS=STDPROD PFX=SRC-;               
                                                            EJECT

 PROCEDURE DIVISION.                                             
                                                                 
 0000-MAINLINE.                                                   
      ENTRY 'DLITCBL'    USING  SRC-PCBMASK   
                                             
 MOVE 0042424242011      TO SOURCE1-KEY-NBR.

 CALL  'CBLTDLI'   USING  GU               
                          SRC-PCBMASK     
                          SRC-SOURCE1-SEG 
                          SOURCE1-SSA.     
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1104
Location: The Netherlands at Hole 19

PostPosted: Thu Feb 15, 2007 3:53 pm
Reply with quote

Quote:
AD
Explanation:

For call-level programs:

Either the function parameter on the call is invalid or the function is not supported for the type of PCB specified in the call. Only applies to full-function DEQ calls. Some possible reasons are:

The function parameter is invalid.
A system service call used a PCB that is not the I/O PCB.
A call issued in a DCCTL environment referred to an unsupported PCB or database.
A message GU or GN call used an alternate PCB instead of the I/O PCB.
A database call used a PCB that is not a DB PCB.
A message GU used the I/O PCB without specifying IN=trancode in the BMP JCL.
A SETS or ROLS call included the I/O area but omitted the token.
A CPI Communications driven program issued the SETO call on the I/O PCB.
A call was issued from an IFP region on an I/O PCB.
Invalid subsystem level for spool API processing.
For command-level programs:

A command was issued that is not supported in the environment. An example is a system service command in an online program. If the command is correct, some other possible causes are:

Referencing a DB PCB on a system service command. System service commands must reference the I/O PCB.
Referencing an I/O PCB for a database command, or not defining an I/O PCB before issuing system service commands.
A command issued in a DCCTL environment referred to an unsupported database or DB PCB.
Programmer response:
Be sure that the specified function is valid for the PCB specified by the request.



Could you please post the extended code (from your compile listing) and your PCB? There's a conflict between your call-function and your PCB.
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

 


Similar Topics
Topic Forum Replies
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Concatenate 2 fields (usage national)... COBOL Programming 2
No new posts Cobol COMP-2 fields getting scrambled... Java & MQSeries 6
No new posts Converting unpacked fields to pack us... SYNCSORT 4
No new posts Data for newly added fields not displ... IMS DB/DC 6
Search our Forums:

Back to Top