× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: asdbget: lib/file.member
  • From: Sean Porterfield <sporter@xxxxxxxxxxxx>
  • Date: Tue, 29 Feb 2000 15:46:35 -0500
  • Organization: Best Distributing Co.

Since it was brought up once before...  When the member name doesn't
match the file name, asdbget doesn't work.

There are probably some good solutions to this problem that work in many
cases.  I only have one solution that isn't very elegant, but it does
work (at least for me).  (diff file attached)

It would probably be better if we could specify the filename in
lib/file.member format, but I don't know enough about C to parse the
command line that way.  I also don't know that I made
everything "correct" - like I said, "It works for me"

Another option might be to get *FIRST as the member, but I don't know
how easy that is.  Or maybe a list of members using DSPFD might be
appropriate.  Just some thoughts that don't relate to my "fix".
*** /usr/local/src/asdbget.0.2/asdbget.c.orig   Mon Feb 21 12:45:26 2000
--- /usr/local/src/asdbget.0.2/asdbget.c        Tue Feb 29 15:18:54 2000
***************
*** 72,80 ****
  
  
  #ifdef HAVE_LIB5250
! static char shortopts[] = "m:o:pu:";
  #else
! static char shortopts[] = "o:pu:";
  #endif
  
  #ifdef HAVE_GETOPT_LONG
--- 72,80 ----
  
  
  #ifdef HAVE_LIB5250
! static char shortopts[] = "m:b:o:pu:";
  #else
! static char shortopts[] = "b:o:pu:";
  #endif
  
  #ifdef HAVE_GETOPT_LONG
***************
*** 83,88 ****
--- 83,89 ----
  #ifdef HAVE_LIB5250
      { "map",            1,    0,    'm' },
  #endif
+     { "member",           1,    0,    'b' },
      { "output",                 1,    0,    'o' },
      { "prompt",                 0,    0,    'p' },
      { "user",           1,    0,    'u' },
***************
*** 138,143 ****
--- 139,145 ----
  static char *opt_password = NULL;
  static char *opt_host = NULL;
  static char *opt_file = NULL;
+ static char *opt_member = NULL;
  #ifdef HAVE_LIB5250
  static char *opt_map = NULL;
  #endif
***************
*** 187,193 ****
      }
    printf ("\n"
  #endif
! "  --output, -o OFILE            Specify output file (default: stdout).\n\
    --prompt, -p                  Always prompt for password.\n\
    --user, -u UNAME              Specify the login user (default: %s).\n\
  \n\
--- 189,196 ----
      }
    printf ("\n"
  #endif
! "  --member, -b MEMBER                Specify member name (default: 
filename).\n\
!   --output, -o OFILE            Specify output file (default: stdout).\n\
    --prompt, -p                  Always prompt for password.\n\
    --user, -u UNAME              Specify the login user (default: %s).\n\
  \n\
***************
*** 211,217 ****
      }
    printf ("\n"
  #endif
! "  -o OFILE                      Specify output file (default: stdout).\n\
    -p                            Always prompt for password.\n\
    -u UNAME                      Specify the login user (default: %s).\n\
  \n\
--- 214,221 ----
      }
    printf ("\n"
  #endif
! "  -b MEMBER                  Specify member name (default: filename).\n\
!   -o OFILE                      Specify output file (default: stdout).\n\
    -p                            Always prompt for password.\n\
    -u UNAME                      Specify the login user (default: %s).\n\
  \n\
***************
*** 518,523 ****
--- 522,531 ----
          opt_user = optarg;
          break;
  
+       case 'b':
+         opt_member = optarg;
+         break;
+ 
  #ifdef HAVE_LIB5250
        case 'm':
          opt_map = optarg;
***************
*** 590,595 ****
--- 598,607 ----
    get_fd_data ();
  
    XML_header ();
+   if (opt_member != NULL) {
+     strcat(opt_file, ".");
+     strcat(opt_file, opt_member);
+   }
    get_file (opt_file, file_lrl, file_data_cb);
    XML_footer ();
  

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.