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

Passing database pointer into main module


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

New User


Joined: 05 Dec 2007
Posts: 57
Location: chennai

PostPosted: Tue Jan 29, 2008 7:45 pm
Reply with quote

Code:

MODUL:
        PROC(IMSDB1_PCB_PTR,IMSDB2_PCB_PTR) OPTIONS(MAIN)             REORDER  ;



From the above code from where they are passing the database pointer ?
someone said it is from PSB . Can any one explain this in detail ?
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: Wed Jan 30, 2008 1:01 am
Reply with quote

This 'someone' is right. At the start of the execution the pointers are addressed to the PCB's in the PSB. Mind you; in the sequence the PCB's are defined in the PSB. Pointer names may differ from the PCB names, it's the sequence that's important.

How it's done is not important: for that you have your compiler and linker including IMS.

Moreover: your program runs under and within IMS (DFSRRC00) where you pass the parameters (your PSB) to your program. Look at your program as a called module receiving parameter from IMS.
Back to top
View user's profile Send private message
arivazhagan_k

New User


Joined: 05 Dec 2007
Posts: 57
Location: chennai

PostPosted: Wed Jan 30, 2008 2:43 pm
Reply with quote

Thank for your response.

Quote:
Look at your program as a called module receiving parameter from IMS


So from your words ,can i take run time excution of the ims program the control will start from PSB or IMS ?
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 Jan 31, 2008 1:07 am
Reply with quote

Here's am example of a job running under IMS. You may notice you don't execute your program but DFSRRC00 with parameters for your program (MBR) and PSB.

Code:
//       PROC  MBR=TEMPNAME,SOUT='*',PSB=,BUF=8,                       
//             SPIE=0,TEST=0,EXCPVR=0,RST=0,LOGT=TPCART,SUF=,           
//             PRLD=,SRCH=0,CKPTID=,MON=N,LOGA=0,LIB='NULLFILE',       
//             FMTO=T,IMSID=,SWAP=,RGN=1536K,DBRC=N,IRLM=,IRLMNM=,     
//             SID=,BKO=N,IOB=,SSM=,APARM=                             
//G EXEC PGM=DFSRRC00,REGION=&RGN,                                     
//             PARM=(DLI,&MBR,&PSB,&BUF,                               
//             &SPIE&TEST&EXCPVR&RST,&PRLD,                             
//             &SRCH,&CKPTID,&MON,&LOGA,&FMTO,                         
//             &IMSID,&SWAP,&DBRC,&IRLM,&IRLMNM,                       
//             &BKO,&IOB,&SSM,&APARM)                                   
//STEPLIB  DD  DSN=IMS&SID..RESLIB,DISP=SHR                             
//         DD  DSN=&LIB,DISP=SHR                                       
//DFSRESLB DD  DSN=IMS&SID..RESLIB,DISP=SHR                             
//IMS      DD  DSN=IMS&SID.&SUF..PSBLIB,DISP=SHR                       
//         DD  DSN=IMS&SID.&SUF..DBDLIB,DISP=SHR                       
//PROCLIB  DD  DSN=IMS&SID..PROCLIB,DISP=SHR                           
//DFSVSAMP DD  DSN=IMS&SID..PROCLIB(DFSVSMUT),DISP=SHR               
//IEFRDER  DD  DUMMY,UNIT=(&LOGT,,DEFER),                             
//             DCB=(RECFM=VB,BLKSIZE=1920,LRECL=1916,BUFNO=2)         
//IEFRDER2 DD  DUMMY,UNIT=(&LOGT,,DEFER),                             
//             DCB=(RECFM=VB,BLKSIZE=1920,LRECL=1916,BUFNO=2)         
//SYSUDUMP DD  SYSOUT=&SOUT,DCB=(RECFM=FBA,LRECL=121,BLKSIZE=605),   
//             SPACE=(605,(500,500),RLSE,,ROUND)                     
//IMSMON   DD  DUMMY                                                 
//SYSOUT   DD  SYSOUT=&SOUT                                           
//SYSPRINT DD  SYSOUT=&SOUT                                           
//ABENDAID DD  SYSOUT=&SOUT                                           

Back to top
View user's profile Send private message
arivazhagan_k

New User


Joined: 05 Dec 2007
Posts: 57
Location: chennai

PostPosted: Thu Jan 31, 2008 3:01 pm
Reply with quote

Thank you very much for spending time for this query .
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 What database does Jobtrac use CA Products 4
No new posts Passing Parameters to Programs Invoke... PL/I & Assembler 5
No new posts Passing SYSPRINT to Invoked Program PL/I & Assembler 9
No new posts Moving Or setting POINTER to another ... COBOL Programming 2
No new posts Capturing COBOL job and program names... All Other Mainframe Topics 2
Search our Forums:

Back to Top