Skip to main content

How to use XDBC to read a relative file

  • May 20, 2020
  • 1 reply
  • 0 views

Robert Redekop

Hi.  XDBC manual says you can make an XFD file for a relative cobol file.  And you can.  Once you have, how do you access a specific record?  When I google how to use SQL to select a specific record, I get information on LIMIT/OFFSET keywords (not in the manual) and ROW_NUMBER function for window processing (not in the manual.

 

So, can I use XDBC to access a specific record#, or do I have to change my record layout(s) to include a flag field which can be searched with the "WHERE" clause?


#XFD
#Relative
#XDBC
#SQL

1 reply

Stephen Hjerpe
  • Participating Frequently
  • May 20, 2020

Hi.  XDBC manual says you can make an XFD file for a relative cobol file.  And you can.  Once you have, how do you access a specific record?  When I google how to use SQL to select a specific record, I get information on LIMIT/OFFSET keywords (not in the manual) and ROW_NUMBER function for window processing (not in the manual.

 

So, can I use XDBC to access a specific record#, or do I have to change my record layout(s) to include a flag field which can be searched with the "WHERE" clause?


#XFD
#Relative
#XDBC
#SQL

  select * from recordfile where record_number = 42;

record_number is a pseudo column that AcuXDBC maintains, it does not exist in the actual file