Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Can we use F command code in the root segment

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IMS DB/DC
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    Post subject: Can we use F command code in the root segment
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    Post subject:
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    Post subject: Reply to: Can we use F command code in the root segment
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    Post subject:
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....

http://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    Post subject: Reply to: Can we use F command code in the root segment
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    Post subject: Reply to: Can we use F command code in the root segment
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

Site Director


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

PostPosted: Mon Jun 02, 2008 8:42 pm    Post subject:
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    Post subject: Reply to: Can we use F command code in the root segment
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    Post subject:
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    Post subject: Reply to: Can we use F command code in the root segment
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> IMS DB/DC All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 pm
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts IMS region inactive - User abend code... gthmrj IMS DB/DC 5 Tue Mar 07, 2017 12:29 pm
No new posts Customizing the ISPF HILITE Command Pedro TSO/ISPF 3 Fri Mar 03, 2017 11:49 pm
No new posts CA Workload Automation event code help vinu78 CA Products 10 Wed Mar 01, 2017 10:05 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us