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

Can we use F command code in the root segment


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

New User


Joined: 11 Oct 2004
Posts: 9

PostPosted: Wed May 28, 2008 12:14 pm
Reply with quote

Can we use F command code in the root segment? When i use 'F' & 'L' command codes it is fetching the same segment occurance in the root segment. Solution plzzzz
Back to top
View user's profile Send private message
Srihari Gonugunta

Active User


Joined: 14 Sep 2007
Posts: 295
Location: Singapore

PostPosted: Wed May 28, 2008 3:57 pm
Reply with quote

Yes you can. Probably you have a single root segment in your DB.
Back to top
View user's profile Send private message
sunilnatarajrk

New User


Joined: 11 Oct 2004
Posts: 9

PostPosted: Wed May 28, 2008 5:22 pm
Reply with quote

I don't think so. It looks like you can't do a F command code or L command code in the root segments. Its is restricted here.
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 May 29, 2008 5:08 am
Reply with quote

Well, then, what are you trying to do? If you would kindly explain then we could help. Every situation is unique. Take a look at this topic....

ibmmainframes.com/viewtopic.php?t=26538

If you could tell us what you want to do and give us a look at your DBD (data base definition), then we could help more quickly.
Back to top
View user's profile Send private message
sunilnatarajrk

New User


Joined: 11 Oct 2004
Posts: 9

PostPosted: Thu May 29, 2008 6:12 pm
Reply with quote

No Sandy, I am in the process of learning. For the learning purpose, i have created a sample database and inserted lot of records. And i tried using all the command codes to know its efficiency. I have a root segment called "patient" and it has more than 4 occurances. I used a F command code here to retrieve the first occurance with a GN call as well as a GU call. I couldn't retrieve the first occurance. Then i thougt that F command code won't work for the root segment and started trying the L command code to fetch the last occurance.

Both the calls fetches the same records and i surfed in internet to know more about the F & L command codes. And it has been clearly stated that the usage of F and L command codes in the root segment is restricted. For your reference i am giving my DBDSRCE also:-

Code:
DBD NAME=MEDDBD,ACCESS=HDAM,                 
      RMNAME=(DFSJDC40,010,00000120,00004096)
DATASET DD1=MEDDBD,DEVICE=3390,SIZE=4096     
SEGM   NAME=PATIENT,PARENT=0,BYTES=35       
FIELD  NAME=(PNO,SEQ,U),START=1,             
      BYTES=5,TYPE=C                         
FIELD  NAME=PNAME,START=6,                   
      BYTES=10,TYPE=C                       
FIELD  NAME=PADDR,START=16,                 
      BYTES=10,TYPE=C                       
FIELD  NAME=PMOB,START=26,                   
      BYTES=10,TYPE=C                       
SEGM   NAME=ILLNESS,PARENT=PATIENT,BYTES=20 
FIELD  NAME=(ILLDATE,SEQ,M),START=1,         
      BYTES=10,TYPE=C                       
FIELD  NAME=ILLNAME,START=11,               
      BYTES=10,TYPE=C                       
SEGM   NAME=TRTMENT,PARENT=ILLNESS,BYTES=30
Back to top
View user's profile Send private message
sunilnatarajrk

New User


Joined: 11 Oct 2004
Posts: 9

PostPosted: Mon Jun 02, 2008 3:29 pm
Reply with quote

I have given my DBDSRCE. Can anybody clarify my doubt pleasE?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Jun 02, 2008 8:42 pm
Reply with quote

Hello,

In addition to looking around the internet, i'd suggest using the "IBM Manuals" link at the top of the page and from the manuals listed look in the IMS command reference manual.
Back to top
View user's profile Send private message
mkarthikeyan

New User


Joined: 07 Aug 2008
Posts: 34
Location: Bangalore

PostPosted: Sun Aug 17, 2008 3:53 am
Reply with quote

IMS disregards F when you supply it at the root level or with a GU or GHU.
Back to top
View user's profile Send private message
Sandy Zimmer

Active Member


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

PostPosted: Mon Aug 18, 2008 8:30 pm
Reply with quote

A GU (get unique) with no ssa statements will always position you at the beginning a the database.
Back to top
View user's profile Send private message
mkarthikeyan

New User


Joined: 07 Aug 2008
Posts: 34
Location: Bangalore

PostPosted: Tue Aug 19, 2008 2:32 pm
Reply with quote

Sandy,
I cudn't get you? It would be great if you explain your reply that is relevant to the topic? Why do you what to give a GU call that is unqualified?
Back to top
View user's profile Send private message
Sandy Zimmer

Active Member


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

PostPosted: Tue Aug 19, 2008 4:38 pm
Reply with quote

Didn't someone ask about getting the first root segment? Command codes in a root ssa only apply to their child segments.
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 RACF - Rebuild SETROPTS command which... All Other Mainframe Topics 3
No new posts run rexx code with jcl CLIST & REXX 15
No new posts Compile rexx code with jcl CLIST & REXX 6
No new posts Routing command Address SDSF to other... TSO/ISPF 2
No new posts DTL - how to define key with stacked ... TSO/ISPF 3
Search our Forums:

Back to Top