[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference ilbbak::ibi_focus

Title:FOCUS, from INFORMATION BUILDERS
Moderator:ZAYIUS::BROUILLETTE
Created:Thu Feb 19 1987
Last Modified:Mon May 05 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:615
Total number of notes:1779

93.0. "External Files" by BLITZN::LEBARIO () Thu Jul 14 1988 12:08

I've been working on a cost center report for our ledger, one thing that
is required on this report is that the fiscal month and the fiscal month
ending date be displayed on each page header.  At this point, I did not
want to create a segment in my master file since I felt that it would be
somewhat wasteful.  Instead, I felt that maybe I could somehow read the
file with this information, the closing card file, and use it to print
the information on the header.  

I've tried using the MODIFY command but that requires an output filename
to write the data to.  Also, when I tried to print out the data values
that I had read in, an error was returned since the fieldnames were not
recognized.

Has anyone out there read information in from an external file and used
it in a request?  Or would it be easier just to create the segment.

Any help is appreciated,

Victor Lebario
BLITZN::LEBARIO
522-2849


    
T.RTitleUserPersonal
Name
DateLines
93.1ideasFR0002::MADDENFri Jul 22 1988 15:528
    We use two methods to get fiscal month and begining and end dates
    in reports.  
      1. Include fex's which set &fm etc.
      2. From a host file we cross reference to a date reference file
    Oh I almost forgot, we also have a CALENDAR.DAT which we read using
    dialogue manager code to find fiscal dates based on input dates.
    
    richard 
93.2Use Dialogue Mgr. and '&' variables.NRPUR::CUSACKFri Jul 29 1988 15:378
    Create an external reference file as noted in reply 1, and using
    dialogue manager you can read this file and assign the fiscal month
    and year to dialogue manager variables - i.e., &FM, &FY.  Then execute
    the table request from inside the dialogue manager routine, and
    you will be able to print the dialogue manager variables in the
    header of the report.
    
    -Mike Cusack
93.3'&' variables and SubroutinesBLITZN::LEBARIOSun Jul 31 1988 12:4620
    Thanks for the replies, I did use the Dialogue manager with the
    "&" variables and everything worked just fine.  One trick I tried
    to do was use the variable &FM, which is a numeric month, and input
    it into a locally created subroutine to convert it to a string, and
    I kept getting the error 
    
    FOC062 POINT TO CALCULATE FIELD IS NOT SUPPLIED...'USE WITH'
                       
    I called the HOTLINE in Dallas and they really couldn't give an
    answer but suggested I use DECODE instead.  I since have used
    DECODE and everything worked fine, but does anyone out there
    know why this error occurs?  
    
    BTW, I did test the subroutine using a numeric month from a segment
    and it worked okay, it's just when I try to pass it a FOCUS variable
    that it has this trouble.  Also, the subroutine is written in COBOL.
    
    
    Again, thanks in advance for your help
    
93.4FOC062 Error...NRPUR::CUSACKMon Aug 01 1988 12:0619
    <FOC062 POINT TO CALCULATE FIELD IS NOT SUPPLIED ... USE WITH>
    
    That error generally occurs when you are defining a field for a
    report and Focus can't figure out which segment the calculation
    or defined field belongs to.  So what you have to do in this case
    is tell Focus in what segment to place the defined field or 
    calculation.  Example:
    
    		DEFINE FILE PROD
    		NCOUNT/I5 WITH COST = NCOUNT+1;
    		END
    
    In this case PROD is the Focus file and COST is a field in one of
    the segments of PROD.  NCOUNT is a temporary field.  I'm still
    not sure from your description exactly what you are doing in your
    situation but perhaps this might help some.  If it doesn't, maybe
    with a more detailed description I could help more.
    
    -Mike