[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

452.0. "v6.1 problem with .com files" by KIRKTN::CJARDINE (born to eat nuts) Mon Sep 02 1991 08:18

    
    We've just installed v6.1.0, and we're having a few teething 
    problems. I've read through the "Summary of new features Release 6.1" 
    but with no success, so any help you can give me will be 
    appreciated.
    
    I have a fex which ran happily as part of a system until we installed 
    the new version. The fex displays a menu where the user can enter 
    selection details, then executes various other fexes depending on the 
    selections entered, going on to print the resulting report.
    
    Problem is with new version of FOCUS nothing happens. The user goes 
    into FOCUS, no error messages are displayed, then back to the 
    higher level menu.
    
    The fex works fine if I enter
    
    >FOCUS "EX SPD_CAL"
    
    at the dcl prompt. As soon as I put exactly the same command in a 
    .com file, nothing happens. 
    
    There were some differences in the settings between the .com file run, 
    and the dcl-command level run. I had put a SET command in to display 
    the settings and give me the opportunity to change them. 
    There was a difference between the SCREEN and MORE parameters (among
    others). Explicitly setting them in the FEX, didn't seem to change the 
    settings at all. 
    
    Any hints? 
    
    Christine
         
T.RTitleUserPersonal
Name
DateLines
452.1AIMHI::CIONI_LTue Sep 03 1991 17:525
How are you calling /going into FOCUS and from where are you executing the fex?
Care to share the .com you are trying to use??

LisaC
452.2.com and .fex for the problemMASALA::CJARDINEborn to eat nutsWed Sep 04 1991 07:01273
    
    Sure.
    
    In reality, within the system (mostly POWERHOUSE) the .com file is 
    run from a powerhouse program. The com file itself really simple ie.
    
! COM FILE TO PRODUCE CALENDAR REPORT
! THIS IS INVOKED FROM THE REPORTS MENU OF THE SPEED SYSTEM
$FOCUS "EXEC SPD_CAL"
    
    
    In an attempt to isolate the problem though, I started at the bottom 
    and worked up. Since there is at least one higher level com file which
    sets things, I decided to start by running the fex, then going up a
    level at time to see where the problem began. I did this, completely 
    outside the powerhouse system.
    
    1.	 entered FOCUS "EX SPD_CAL" at the dcl prompt. Absolutely fine. 
         This ran OK.
    
    2.	 made a simple command file to run the job. Initially same as 
         com file above. As soon as run from com file, problems began. 
         Also amended it to add a few additional commands to check things 
         out, eg 

$ FOCUS
? SET
? PATH
? TERMINAL
SET
EX SPD_CAL ECHO=ALL
? SET
? PATH
? TERMINAL


    The fex also follows. This works ok in v5.3 and works ok 
    interactively in v6.1.
    
    USING the echo=all option in the .com file I can see the fex running 
    through the CRTFORM line, and the following lines which set up the 
    screen, then just stopping and taking me back to dcl level  
    
    I've clutched at all kinds of straws to see what effect they have. 
    The only one worth mentioning is the new CRTFORM NOREAD. With this it 
    just runs through the whole job, ok, withoout displaying the screen, 
    taking default options for all variables, and going on to print 
    report.
    
    Again any help would be appreciated. This is either something 
    incredibly simple which I am missing, or something really obscure I 
    haven't a hope in finding.
    
    Thanks
    
    Christine
    
-* created 1st oct 1990  by christine jardine
-* purpose : to choose what options required for cal_report
-*
-* files used
-*        [speed.dat]employee.dat
-*              "    emp_wrk_arr.dat
-*
-* *******************************************************************
-* *******************************************************************
-*  this wee bit does any one-off set-up
-* *******************************************************************
SET TEMPDIR=FOC$TEMP
SET NODATA=0
SET PAUSE=OFF
SET MESSAGE=OFF
-*   okay i have added these two copies of a dummy file
-*   to the files i was going to delete to get round the error
-*   message. There must be better way of doing this, but needs must!
VMS COPY FOC$DIR1:DUMMY.FILE FOC$TEMP:SPD_CAL.DOC;*
VMS COPY FOC$DIR1:DUMMY.FILE FOC$TEMP:FOCSORT.FTM
VMS DELETE FOC$TEMP:SPD_CAL.DOC;*
VMS DELETE FOC$TEMP:FOCSORT.*;*
-* without the run command the files are not deleted
-* until the end of the job - baad....
-RUN
-START
-SET &ERR = '                                                   ';
-SET &&STRT_DATE = &YMD;
-SET &&END_DATE = &YMD;
-SET &&SECTION = '    ';
-SET &&TEAM = ' ';
-SET &&ALL = 'X';
-SET &&JUST_O = ' ';
-SET &&JUST_H = ' ';
-* this label is used when error occurs and values are not to
-* be blanked out
-BEGIN
-* this screen asks the user to pick details 
-*****************************************************************
-CRTFORM                                                                        
-* TEMPORARY FIELD DEFINITION &ERR        A60
-* TEMPORARY FIELD DEFINITION &&TEAM      A1
-* TEMPORARY FIELD DEFINITION &&STRT_DATE A6
-* TEMPORARY FIELD DEFINITION &TEAM       A1
-* TEMPORARY FIELD DEFINITION &&ALL        A1
-* TEMPORARY FIELD DEFINITION &&JUST_O     A1
-* TEMPORARY FIELD DEFINITION &&JUST_H     A1
-* TEMPORARY FIELD DEFINITION &&SECTION   A4
-* TEMPORARY FIELD DEFINITION &&END_DATE  A6
-"<.G.<1>SPD_CAL : Employee Work details - Calendar Report"
-" "
-"Please enter"
-"<8>Start date (YYMMDD)<46>: <.HGT.&&STRT_DATE><.G. "
-"<8>End date  (YYMMDD)<46>: <.HGT.&&END_DATE<.G. "
-" "
-"Enter X beside details to print"
-"<27>All codes<46>: <.HGT.&&ALL<.G. "
-"<8>or<27>Holiday<46>: <.HGT.&&JUST_O<.G. "
-"<8>& <10>/ or<27>Overtime<46>: <.HGT.&&JUST_H<.G. "
-" "
-" "
-"For just one section enter section code<46>: <.HGT.&&SECTION><.G. "
-"<10>one team    enter team code<46>: <.HGT.&&TEAM><.G. "
-" "
-"Use TAB to Skip over fields, Enter to run request, PF3 to cancel"
-" "
-"<15><.HD.&ERR "
-" "
-SET &ERR = ' ';
-VALIDATE
-* check start date is before end date
-SET &ERR = IF &&STRT_DATE GT &&END_DATE THEN
-         'END DATE MUST BE LATER THAN START DATE';
-IF &&STRT_DATE GT &&END_DATE THEN GOTO BEGIN;
-*
-* check at least one lot of print details selected
-SET &BARF = &&ALL || &&JUST_H || &&JUST_O;
-IF &BARF.LENGTH GE 1 THEN IF &BARF NE ' ' THEN GOTO CHKTEAM;
-SET &ERR = 'YOU MUST USE X TO SELECT AT LEAST 1 SET OF DETAILS';
-GOTO BEGIN;
-*
-CHKTEAM
-IF &&TEAM.EXIST THEN GOTO CHKT;
-GOTO VIEWIT
-CHKT
-IF &&TEAM IS A OR B OR C OR D OR N THEN
-                                   GOTO VIEWIT;
-IF &&TEAM IS  ' ' THEN GOTO VIEWIT;
-SET &ERR = 'YOU MUST USE A VALID TEAM CODE (A, B, C, D, N )';
-GOTO BEGIN;
-*****************************************************************
-* THIS DECIDES WHICH OPTION WAS TAKEN
-*****************************************************************
-*  okay, now format the report request, and run it
-*
-VIEWIT
-*****************************************************************
-* does all relevant filedefs
-*****************************************************************
EX SPD_DEF
-*****************************************************************
SET PANEL=136
SET LINES=60
-*****************************************************************
-*****************************************************************
-*  this fex selects by section
-*****************************************************************
-INCLUDE SPD_SEL
-*****************************************************************
-*  this 2nd   fex selects is the main define on the t-rep file
-*****************************************************************
-INCLUDE SPD_CRP1
-*****************************************************************
-*  this is the main meat of thios job. not very elegant, but it
-*  works. relevant define is done depending on where the user put
-*  an x on the menu
-*****************************************************************
-IF &&ALL NE 'X' GOTO OTHERDEF;
-*****************************************************************
-*  define for all codes to be printed
-*****************************************************************
PRT_STAT/A2 = IF (EW_WRK_STAT EQ 'W' AND EW_TS_IND EQ 'AA') THEN 'D'
           ELSE (IF EW_WRK_STAT EQ 'W' AND EW_TS_IND EQ 'BB') THEN 'N'
           ELSE IF EW_WRK_STAT EQ 'OF' THEN ' '
           ELSE EW_WRK_STAT;
-GOTO PASTDEF
-OTHERDEF
-IF &&JUST_H EQ 'X' AND &&JUST_O EQ ' ' GOTO JUST_H;
-IF &&JUST_H EQ ' ' AND &&JUST_O EQ 'X' GOTO JUST_O;
-*     here must both be x
-*****************************************************************
-*  define for both overtime and holiday
-*****************************************************************
PRT_STAT/A2 = IF EW_WRK_STAT EQ 'OT' THEN 'OT'
           ELSE IF EW_WRK_STAT EQ 'H' THEN 'H'
           ELSE ' ';
-GOTO PASTDEF;
-*****************************************************************
-*  define for just overtime
-*****************************************************************
-JUST_O
PRT_STAT/A2 = IF EW_WRK_STAT EQ 'OT' THEN 'OT'
           ELSE ' ';
-GOTO PASTDEF;
-*****************************************************************
-*  define for just holiday
-*****************************************************************
-JUST_H
PRT_STAT/A2 = IF EW_WRK_STAT EQ 'H' THEN 'H'
           ELSE ' ';
-*
-PASTDEF
-*****************************************************************
-* this is remainderr of report . incldes end of define, then
-* heading layout etc   
-*
-*****************************************************************
-INCLUDE SPD_OCR2
END
-*****************************************************************
-RUN
-*****************************************************************
-* now check if report has to be printed or not - just jump
-* back to beginning if not. - no longer option to print or not  
-* otherwise print (in landscape format ) on users default
-* printer and then delete the document
-*****************************************************************
VMS PRINT /SETUP=LANDSCAPE FOC$TEMP:SPD_CAL.DOC
-RUN
-*****************************************************************
VMS DELETE FOC$TEMP:SPD_CAL.DOC;*
-RUN
-GOTO START
-*****************************************************************
-* reset everything prior to leaving this fex.
-*****************************************************************
-FOC_EXIT
-IF &LINES EQ 0 THEN GOTO NODELETE;
VMS DELETE T_WRK_AR.MAS;*
VMS DELETE T_EMP.MAS;*
VMS DELETE T_REP.MAS;*
VMS DELETE FOC$TEMP:T_WRK_AR.FTM;*
VMS DELETE FOC$TEMP:T_EMP.FTM;*
VMS DELETE FOC$TEMP:T_REP.FTM;*
-NODELETE
-RUN
-EXIT
-* amended   chrsitine 24th oct 1990
-*           to remove the display of the report
-*           (old version kept in spd_cal.old)
-*
-*           using .com to run this with
-*           more=on - display every page
-*           more=off - display just flashes in frontof eyes
-*
-*         should investigate how cfts does it - must be some
-*         way round problem
-*
-*  31st oct 1990 christine
-*                to allow for one secion or all sections
-*
-*  17th dec 1990 christine
-*                strange error message - cannot copy dummy file to
-*                disk_alt...spd_cal.doc
-*                should not be this area (maybe is - strange....)
-*
-*  14th jan 1991 christine
-*                to select on year too - ootherwise get data for
-*                every january
-*
-*       Mar 1991 christine
-*                to select any dates - any team
-*
-*
-* *******************************************************************

452.3syntax can get ya!USMFG::BHYNESTue Sep 10 1991 12:0613
    I have found in my experience that sometimes syntax can in reality
    look ok and work ok interactively but .... in batch or in control
    of a com file its like a new game...
    
    In your CRTFORM,  I always use -CRTFORM START
       and                         -CRTFORM END
    
    Within your CRTFORM
    the next to the last line   -"<15><.HD.&ERR "
    should that be              -"<15><.HD.&ERR><.G. "
    
    
    
452.4Thanks, but didn't improve thingsKURMA::CJARDINEborn to eat nutsWed Sep 11 1991 08:0031
    
    Thanks for the suggestions but still no joy.
    
    1. Added the ><.G.> and tried again - no change
    
    2. Added the START and END qualifiers - no change
    
    3. tried using the paint command in TED. THought there might be options
    / parameters changed in the new version, that FOCUS might set 
    differently. - certain parameters did change , see below, but still no
    change in the way it behaves - still does nothing.
    
    -"<.G.<1>WHEE<.W.<5>   Start date (YYMMDD)<46>: <.HT.&&STRT_DATE><56>
    <.G.<57>
    -<58>"
    -"<8>End date  (YYMMDD)<46>: <.HT.&&END_DATE><56>"
    -"Enter X beside details to print"
    -"<27>All codes<46>: <.HT.&&ALL><51>"
    -"<8>or<27>Holiday<46>: <.HT.&&JUST_O><51>"
    -"<8>& / or<27>Overtime<46>: <.HT.&&JUST_H><51>"
    -"For just one section enter section code<46>: <.HT.&&SECTION><54>"
    -"<10>one team<22>enter team code<46>: <.HT.&&TEAM><51>"
    -"<15><.HD.&ERR<76>"
    -CRTFORM END
    
    I appreciate your help, any further suggestions would be much
    appreciated also 
    
    Thanks
    
    Christine
452.5strange messageUSMFG::BHYNESWed Sep 11 1991 14:3126
    I extracted the fex from .2 and tried running it thru the CRT section
    and I found a message that flashed on my screen just before the
    CRTFORM started. It said;
    
    	ILLEGAL PATH, NO ACTION TAKEN
    
    I found that message was coming from the statement
    
    	SET TEMPDIR=FOC$TEMP
    
    It may be my system but.....
    
    Also, I read your messages in the fex and you were looking for a
    way to not have to copy dummy file just to delete them.
    Using 'VMS STATE' will fix that. It would look like the following;
    
    VMS STATE FOC$TEMP:SPD_CAL.DOC;
    -IF &RETCODE NE 0 THEN GOTO CHKNXT;
    VMS DELETE FOC$TEMP:SPD_CAL.DOC;*
    -CHKNXT
    VMS STATE FOC$TEMP:FOCSORT.FTM;
    -IF &RETCODE NE 0 GOTO START;
    VMS DELETE FOC$TEMP:FOCSORT.FTM;*
    
    bob
    PS - I can post the edited copy I played with here if you would like
452.6thanks but still no improvementKIRKTN::CJARDINEborn to eat nutsThu Sep 12 1991 09:2024
      
      Thanks for the tip round VMS STATE.
      
      As to the ILLEGAL PATH message, I don't get it. We have a 
      logical set here which we use for jobs where a big work area 
      is required. /SUBDIR didn't help in this  case, as its still 
      bound by the users disk quota.
      
      I have tried a couple of things in this area though. Used 
      the new FOCEXTRACT=TEMPORARY, to make sure all temp files do 
      go to temporary area. Removed both TEMPDIR= and FOCEXTRACT= 
      to just have evrything go to default area. Set FOCEXTRACT to 
      DEFAULT, while TEMPDIR set to FOC$TEMP, to make sure there 
      was a conflict in the values. None of this made a jot of a 
      difference.
      
      I wonder if I have forgotten any of these combinations? I 
      seem to recall having a problem before when FOCUS was 
      getting confused mid-job as to where the FOCSTACK was 
      located.
      
      Appreciate all your help
      
      Christine
452.7a shot in the darkMILPND::MADDENWed Sep 18 1991 17:1610
      In keeping with environmental awareness, try this before you call 
      FOCUS, cause some other process (like Powerhouse you mentioned) may
    be still in control of your life.  Its worth a shot.
    
    	$ ON ERROR THEN GOTO START
    	$ DEASSIGN/USER_MODE SYS$INPUT
    	$ START:
    	$ FOCUS
    		.......
    Richard