[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

568.0. "Syntax required please " by KERNEL::FARRANTL (Lee Farrant) Wed Dec 08 1993 09:49

    Hello, I only have a starters manual , if I say what I would 
    	like to do in english could someone tell me the syntax
        in focus please.
    
    
    FIELD1/A1= "Y" IF [TIMENOW] IS GREATER THAN DATEFIELD2 AND "N" IF NOT
    
    also 
                          
    
    FIELD3/DATE FIELD = DATEFIELD4 IF FIELD5 EQ "C" ELSE EQ DATEFIELD5
    
    	PS: My date fields consists of date and time.
    
    Lee
    
    
T.RTitleUserPersonal
Name
DateLines
568.1Try this\RDGE44::ALEUC9ungry of 'orshamThu Dec 09 1993 02:3423
    Lee,
    
    Assuming [TIMENOW] AND DATEFIELDn are actually 64-bit (VMS) date-time
    values, try the following (although I'm a bit confused, surely TIMENOW
    *will always* be greater than any stored data value, unless the clock's
    wrong)...
    
    TIMENOW/A8 = GETSTIME(TIMENOW);
    FIELD1/A1  = IF TIMENOW GT DATEFIELD2 THEN 'Y' ELSE 'N';
    FIELD3/A8  = IF FIELD5 EQ 'C' THEN DATEFIELD4 ELSE DATEFIELD5;
           ^^
    Note the format of FIELD3, the "single quotes" around the values, and
    the terminating semi-colons.
    Also remember that if the above assumptions are correct, you'll have to do a
    further DEFINE to convert FIELD3 (and DATEFIELDn) into a true
    alphanumeric in order to display them.
                                                                        
    If I've got the wrong end of the stick, and you *don't* mean VMS dates,
    then give a bit more detail/background & I'll trya again.
    
    Rgds,
    Paul
    
568.2KERNEL::FARRANTLLee FarrantSun Feb 27 1994 08:5313
    HELLO 
    	ANOTHER QUESTION 
    
    when i execute a fex from the $ using PROMPT INSTEAD OF EXECUTE
    the part in the fex asking for data via a -prompt appears and 
    disappears without giving me a chance to enter anything.
    
    any siggestions. 
    
    when I use exec is does not recognise the -prompt command at all.
    
    lee
    
568.3Let's see moreRDGE44::ALEUC9ungry of 'orshamMon Feb 28 1994 03:066
    Lee,
    
    If its not too long pls post your .fex ( & .com ?)
    
    Rgds,
    Paul
568.4fexUBOHUB::FARRANTLLee FarrantTue Mar 01 1994 19:28182
This is the fex where I cannot get the prompt to prompt me 
when i execute from a $ prompt.
-----------------------------------------------------------------------------


-PROMPT &DTE.I10.ENTER DATE 10 DAYS AGO EG:940101 (YYMMDD).

-SET &SYS_DT           = GETSTIME('A8');
-SET &DT_N_TIME        = CVTSTIME(4,&SYS_DT,'A22');
-SET &DAT_N_TIME       = EDIT(&DT_N_TIME,'$$99$99$99$');
-SET &DATE_N_TIME      = IF EDIT(&DAT_N_TIME,'$$$$9$') EQ ' ' THEN
-    EDIT(&DAT_N_TIME,'9999$') | '0' | EDIT(&DAT_N_TIME,'$$$$$9') ELSE
-    &DAT_N_TIME;

-TYPE &DT_N_TIME

SET LINES=55
SET PAPER=55
SET WIDTH=132

FILEDEF REQUST_O DISK REQUST_O
FILEDEF REQUST_C DISK REQUST_C

DEFINE FILE REQUST_C
X/A20=REQU_RQ_RCVD;
XX/A3=EDIT(X,'$$$999$');
Y/A2=DECODE XX ( JAN 01 FEB 02 MAR 03 APR 04 MAY 05 JUN 06 JUL 07
AUG 08 SEP 09 OCT 10 NOV 11 DEC 12 );
Z/I10=(EDIT(EDIT(X,'$$$$$$$$$99') | Y)*100) + EDIT(EDIT(X,'99$'));
-*
LOG/A5=EDIT(REQU_LOG_NO,'99999');
END

TABLE FILE REQUST_C
PRINT REQU_CUS_NAM  
REQU_RQ_STAT
LOG
REQU_CUSTPON
REQU_RQ_RCVD 
REQU_RQ_CLSD
REQU_CONFTYP
REQU_OPT_NO
REQU_PRODES1
REQU_SPRDTYP
Z
REQU_POSTAL
REQU_CITY

IF REQU_CUS_SFN CONTAINS 'RITZ' OR 'BLOCKBUSTER'
IF Z GT &DTE

ON TABLE HOLD AS HOLD1

END
-RUN

DEFINE FILE REQUST_O
X/A20=REQU_RQ_RCVD;
XX/A3=EDIT(X,'$$$999$');
Y/A2=DECODE XX ( JAN 01 FEB 02 MAR 03 APR 04 MAY 05 JUN 06 JUL 07
AUG 08 SEP 09 OCT 10 NOV 11 DEC 12 );
Z/I10=(EDIT(EDIT(X,'$$$$$$$$$99') | Y)*100) + EDIT(EDIT(X,'99$'));
-*
LOG/A5=EDIT(REQU_LOG_NO,'99999');
END

TABLE FILE REQUST_O
PRINT REQU_CUS_NAM
REQU_RQ_STAT
LOG
REQU_CUSTPON
REQU_RQ_RCVD 
REQU_RQ_CLSD
REQU_CONFTYP
REQU_OPT_NO
REQU_PRODES1
REQU_SPRDTYP
Z
REQU_POSTAL
REQU_CITY

IF REQU_CUS_SFN CONTAINS 'RITZ' OR 'BLOCKBUSTER'
IF Z GT &DTE

ON TABLE HOLD AS HOLD2

END
-RUN

-VMS APPEND HOLD1.FTM HOLD2.FTM

DEFINE FILE HOLD2
PROB/A40=EDIT(REQU_PRODES1,'9999999999999999999999999999999999999999');
CUST/A4=EDIT(REQU_CUS_NAM,'9999');  
STRE/A5=EDIT(REQU_CUSTPON,'99999');
OPT/A5=EDIT(REQU_OPT_NO,'$$99999$');
REC/A15=EDIT(REQU_RQ_RCVD,'9999999$$99999999'); 
CLO/A15=EDIT(REQU_RQ_CLSD,'9999999$$99999999');
CLOO/A15=IF REQU_RQ_CLSD CONTAINS '1858' THEN 'OPEN' ELSE CLO; 
PC/A8=EDIT(REQU_POSTAL,'99999999');
CITY/A8=EDIT(REQU_CITY,'99999999');
END

TABLE FILE HOLD2
HEADING CENTER
"Ritz & Blockbuster History Report from &DTE"
"Report Date and Time &DT_N_TIME" 
"Status codes:"
"O=Open C=Closed F=Closed T=Transfered to another NICE"
" "
FOOTING CENTER
"Digital Equipment Co. Limited"
"Focal Call"
PRINT REQU_RQ_STAT AS 'S'
CUST AS 'CUST'
LOG
STRE AS 'STORE'
REC AS 'LOGGED'
CLOO AS 'CLOSED'
OPT AS 'OPT'
PROB AS 'PROBLEM'
CITY
PC AS 'P/CODE'

BY REQU_RQ_STAT NOPRINT
BY Z NOPRINT

IF REQU_SPRDTYP NE 'F'

ON TABLE HOLD AS GIL FORMAT DOC
END
-RUN

-* ===========================================================================
-* Chargeable Calls.
-* ===========================================================================
DEFINE FILE HOLD2
PROB/A40=EDIT(REQU_PRODES1,'9999999999999999999999999999999999999999');
CUST/A4=EDIT(REQU_CUS_NAM,'9999');  
STRE/A5=EDIT(REQU_CUSTPON,'99999');
OPT/A5=EDIT(REQU_OPT_NO,'$$99999$');
REC/A15=EDIT(REQU_RQ_RCVD,'9999999$$99999999'); 
CLO/A15=EDIT(REQU_RQ_CLSD,'9999999$$99999999');
CLOO/A15=IF REQU_RQ_CLSD CONTAINS '1858' THEN 'OPEN' ELSE CLO; 
PC/A8=EDIT(REQU_POSTAL,'99999999');
CITY/A8=EDIT(REQU_CITY,'99999999');
END

TABLE FILE HOLD2
HEADING CENTER
"Ritz & Blockbuster History Report from &DTE"
"*** CHARGEABLE CALLS ***"
"Report Date and Time &DT_N_TIME" 
"Status codes:" 
"O=Open C=Closed F=Closed T=Transfered to another NICE"
" "
FOOTING CENTER
"Digital Equipment Co. Limited"
"Focal Call"
PRINT REQU_RQ_STAT AS 'S'
CUST AS 'CUST'
LOG
STRE AS 'STORE'
REC AS 'LOGGED'
CLOO AS 'CLOSED'
OPT AS 'OPT'
PROB AS 'PROBLEM'
CITY
PC AS 'P/CODE'

IF REQU_SPRDTYP EQ 'F'

BY Z NOPRINT

ON TABLE HOLD AS GILF FORMAT DOC
END
-RUN
-VMS APPEND GILF.DOC GIL.DOC 
-VMS MAIL GIL.DOC UBOHUB::HANCOXG,UBOHUB::FARRANTL/SUB="Ritz/Blockbuster Report"
-VMS DELETE *.DOC;*
-VMS DELETE HOLD*.*;*

568.5fex 2UBOHUB::FARRANTLLee FarrantTue Mar 01 1994 19:32194
This one has multiple ACT_END_DT fields for each record but I cannot seem to 
make it just pick the last one. The format of ACT_END_DT is 
02-Mar-1994 00:22:24

-----------------------------------------------------------------------------
-PROMPT &DTE.I10.ENTER DATE 10 DAYS AGO EG:940101 (YYMMDD).

-SET &SYS_DT           = GETSTIME('A8');
-SET &DT_N_TIME        = CVTSTIME(4,&SYS_DT,'A22');
-SET &DAT_N_TIME       = EDIT(&DT_N_TIME,'$$99$99$99$');
-SET &DATE_N_TIME      = IF EDIT(&DAT_N_TIME,'$$$$9$') EQ ' ' THEN
-    EDIT(&DAT_N_TIME,'9999$') | '0' | EDIT(&DAT_N_TIME,'$$$$$9') ELSE
-    &DAT_N_TIME;

-TYPE &DT_N_TIME

SET LINES=55
SET PAPER=55
SET WIDTH=132

FILEDEF REQUST_O DISK REQUST_O
FILEDEF REQUST_C DISK REQUST_C
FILEDEF ACTION_O DISK ACTION_O
FILEDEF ACTION_C DISK ACTION_C

JOIN CLEAR *
JOIN REQU_LOG_NO IN REQUST_C TO ALL ACT_LOG_NO IN ACTION_C AS J1

DEFINE FILE REQUST_C
X/A20=REQU_RQ_RCVD;
XX/A3=EDIT(X,'$$$999$');
Y/A2=DECODE XX ( JAN 01 FEB 02 MAR 03 APR 04 MAY 05 JUN 06 JUL 07
AUG 08 SEP 09 OCT 10 NOV 11 DEC 12 );
Z/I10=(EDIT(EDIT(X,'$$$$$$$$$99') | Y)*100) + EDIT(EDIT(X,'99$'));
-*
LOG/A5=EDIT(REQU_LOG_NO,'99999');
END

TABLE FILE REQUST_C
PRINT REQU_CUS_NAM  
REQU_RQ_STAT
LOG
REQU_CUSTPON
REQU_RQ_RCVD 
REQU_RQ_CLSD
REQU_CONFTYP
REQU_OPT_NO
REQU_PRODES1
REQU_SPRDTYP
Z
REQU_POSTAL
REQU_CITY
SUM.LST.ACT_END_DT

IF REQU_CUS_SFN CONTAINS 'RITZ' OR 'BLOCKBUSTER'
IF Z GT &DTE

ON TABLE HOLD AS HOLDA

END
-RUN

JOIN CLEAR *
JOIN REQU_LOG_NO IN REQUST_O TO ALL ACT_LOG_NO IN ACTION_O AS J2

DEFINE FILE REQUST_O
X/A20=REQU_RQ_RCVD;
XX/A3=EDIT(X,'$$$999$');
Y/A2=DECODE XX ( JAN 01 FEB 02 MAR 03 APR 04 MAY 05 JUN 06 JUL 07
AUG 08 SEP 09 OCT 10 NOV 11 DEC 12 );
Z/I10=(EDIT(EDIT(X,'$$$$$$$$$99') | Y)*100) + EDIT(EDIT(X,'99$'));
-*
LOG/A5=EDIT(REQU_LOG_NO,'99999');
END

TABLE FILE REQUST_O
PRINT REQU_CUS_NAM
REQU_RQ_STAT
LOG
REQU_CUSTPON
REQU_RQ_RCVD 
REQU_RQ_CLSD
REQU_CONFTYP
REQU_OPT_NO
REQU_PRODES1
REQU_SPRDTYP
Z
REQU_POSTAL
REQU_CITY
SUM.LST.ACT_END_DT

IF REQU_CUS_SFN CONTAINS 'RITZ' OR 'BLOCKBUSTER'
IF Z GT &DTE

ON TABLE HOLD AS HOLDB

END
-RUN

-VMS APPEND HOLDA.FTM HOLDB.FTM

DEFINE FILE HOLDB
PROB/A40=EDIT(REQU_PRODES1,'9999999999999999999999999999999999999999');
CUST/A4=EDIT(REQU_CUS_NAM,'9999');  
STRE/A5=EDIT(REQU_CUSTPON,'99999');
OPT/A5=EDIT(REQU_OPT_NO,'$$99999$');
REC/A15=EDIT(REQU_RQ_RCVD,'9999999$$99999999'); 
CLO/A15=EDIT(REQU_RQ_CLSD,'9999999$$99999999');
CLOO/A15=IF REQU_RQ_CLSD CONTAINS '1858' THEN 'OPEN' ELSE CLO; 
PC/A8=EDIT(REQU_POSTAL,'99999999');
CITY/A8=EDIT(REQU_CITY,'99999999');
END

TABLE FILE HOLDB
HEADING CENTER
"Ritz & Blockbuster History Report from &DTE"
"Report Date and Time &DT_N_TIME" 
"Status codes:"
"O=Open C=Closed F=Closed T=Transfered to another NICE"
" "
FOOTING CENTER
"Digital Equipment Co. Limited"
"Focal Call"
PRINT REQU_RQ_STAT AS 'S'
CUST AS 'CUST'
LOG
STRE AS 'STORE'
REC AS 'LOGGED'
-*CLOO AS 'CLOSED'
SUM.LST.ACT_END_DT
OPT AS 'OPT'
PROB AS 'PROBLEM'
CITY
PC AS 'P/CODE'

BY REQU_RQ_STAT NOPRINT
BY Z NOPRINT

IF REQU_SPRDTYP NE 'F'

ON TABLE HOLD AS LEE FORMAT DOC
END
-RUN

-* ===========================================================================
-* Chargeable Calls.
-* ===========================================================================
DEFINE FILE HOLDB
PROB/A40=EDIT(REQU_PRODES1,'9999999999999999999999999999999999999999');
CUST/A4=EDIT(REQU_CUS_NAM,'9999');  
STRE/A5=EDIT(REQU_CUSTPON,'99999');
OPT/A5=EDIT(REQU_OPT_NO,'$$99999$');
REC/A15=EDIT(REQU_RQ_RCVD,'9999999$$99999999'); 
CLO/A15=EDIT(REQU_RQ_CLSD,'9999999$$99999999');
CLOO/A15=IF REQU_RQ_CLSD CONTAINS '1858' THEN 'OPEN' ELSE CLO; 
PC/A8=EDIT(REQU_POSTAL,'99999999');
CITY/A8=EDIT(REQU_CITY,'99999999');
END

TABLE FILE HOLDB
HEADING CENTER
"Ritz & Blockbuster History Report from &DTE"
"*** CHARGEABLE CALLS ***"
"Report Date and Time &DT_N_TIME" 
"Status codes:" 
"O=Open C=Closed F=Closed T=Transfered to another NICE"
" "
FOOTING CENTER
"Digital Equipment Co. Limited"
"Focal Call"
PRINT REQU_RQ_STAT AS 'S'
CUST AS 'CUST'
LOG
STRE AS 'STORE'
REC AS 'LOGGED'
SUM.LST.ACT_END_DT
-*CLOO AS 'CLOSED'
OPT AS 'OPT'
PROB AS 'PROBLEM'
CITY
PC AS 'P/CODE'

IF REQU_SPRDTYP EQ 'F'

BY Z NOPRINT

ON TABLE HOLD AS LEEF FORMAT DOC
END
-RUN
-VMS APPEND LEEF.DOC LEE.DOC 
-VMS MAIL LEE.DOC NICE_REPORT/SUB="Ritz/Blockbuster Report"
-VMS DELETE LEE*.DOC;*
-*VMS DELETE HOLD*.*;*

568.6Different resultsTAVIS::LANDAUDEC Israel IM&TThu Mar 03 1994 03:459
    I tried to reproduce your problems but I got different results.
    I extracted .4 to TEST.FEX and did FOCUS "EX TEST".
    The prompt ENTER DATE 10 DAYS AGO EG:940101 (YYMMDD) appeared right
    away.
    Then I tried to check .5
    It seems to me that you are producing reports from EODB data.
    However, your field names differ from mine. For instance, you have
    REQU_LOG_NO and I have RQ_LOG_NO. Would you post your *.MAS and *.ACX
    files (or a pointer to them) ?
568.7v5 Manual Ch15, last page or so...RDGE44::ALEUC9ungry of 'orshamThu Mar 03 1994 07:4129
    Lee,
    
    What you need (if you haven't already got it - if you have I'll have to
    go back to the drawing board) is the following line in effect BEFORE
    you invoke Focus
    
    $ASSIGN/USER 'F$LOGICAL("TT")' SYS$INPUT
    
    Eg TEST.com
    
	$ASSIGN/USER 'F$LOGICAL("TT")' SYS$INPUT
	$FOCUS "EX TEST"
    
                       
       TEST.fex
    
	-PROMPT &DTE.I10.ENTER DATE 10 DAYS AGO EG:940101 (YYMMDD).
	et cetera
    
    That works for me (our friend in Israel probably already has it, which
    is why he/she can't replicate your problem).
    
    Hope that helps
    Paul
    
    PS Incidentally, why specify I10 as the format of the & variable when
    you're asking for 6 digits ?
    
       
568.8thanks UBOHUB::FARRANTLLee FarrantThu Mar 03 1994 13:3221
    RE: 568.6
    
    	Thanks for your reply. The field names are diffent as I am 
    	talking directly with NICE not going through EODB.
    
    	NICE, NEW INTERGRATED CALL HANDLING FOR EUROPE
    
    RE: 568.7
    
    	Paul 
    
    	Thanks again, That worked find. The only manual I have 
    	is a beginners guide, do you know how I can get hold 
    	of the v5 manual. 
    
    	I10 is just my mistake, I will correct it, do you have any
    	idea about note 568.5	
    
    
    	Cheers Lee
    
568.9RDGE44::ALEUC9ungry of 'orshamFri Mar 04 1994 02:2518
    Lee,  (are you in Basingstoke, UK ?)
    
    Being a contractor, I am not familiar with the mechanism which governs
    Manual distribution (I once saw a pallet load of v5 manuals in the
    Crescent in December 1988, and haven't seen more than one or two since
    - perhaps they perished in the fire ! 8^). I certainly haven't seen any
    v6.x manuals, which is a shame 'cos there's a lot more in 6.x than in
    5.0 (and the rest of the world, outside Digital, let alone outside
    Digital UK)
    
    There used to be a string somewhere in here or the other Focus
    conference about how to order manuals, but I can't remember where
    Sure sounds like you need one though.
    
    I'll have a look at your other problem today if I can (between crises -
    you know what its like in the MIS game 8^(
    
    Paul
568.10UBOHUB::FARRANTLLee FarrantFri Mar 04 1994 11:388
    THanks Paul ,m ,
    
    	I have mailed you my MAS file, will speak to yo 
    later.
    
    Yes I am in Viables, Customer Support Centre Basingstoke.