Focal Point
[CLOSED] (FOC36355) INVALID TYPE OF ARGUMENT #1 FOR USER FUNCTION YMD

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/6407086786

September 05, 2017, 12:19 PM
Genius
[CLOSED] (FOC36355) INVALID TYPE OF ARGUMENT #1 FOR USER FUNCTION YMD
hi,

I am getting below error for YMD time frame,
Problem i am getting below is because im trying to use EDIT for time frame. but i do not know how to resolve it.do i need to use something else instead of edit here

  
DEFINE FILE ZEROAT
 DUM/A1=' ';
 PR_NAME/A20 = SUBSTR(60,NAM_LINE,1,20,20,'A20');
 P_DATE/A10=EDIT(ACT_DATE,'$$$$99$$')|EDIT(ACT_DATE,'$$$$$$/99/')|
 EDIT(ACT_DATE,'$$99$$$$');
 NUM_OF_REC/I8=1;
 SDA/A6=EDIT(STR_DATE,'$$99$$$$')|EDIT(STR_DATE,'$$$$99$$')|
 EDIT(STR_DATE,'$$$$$$99');
 EDA/A6=EDIT(END_DATE,'$$99$$$$')|EDIT(END_DATE,'$$$$99$$')|
 EDIT(END_DATE,'$$$$$$99');
 TIME_FRAME/I3=YMD(SDA,EDA);
 TF/A10=EDIT(TIME_FRAME)|' Days';
 PR_CTN/A10=EDIT(SUB_NO,'9999999999');
 CREDIT/A10=DECODE CLA_CODE (E 'EMPLOYEE' A 'GOVERNMENT'
  B 'KNOWN' M 'MABEL' D 'POOR' C 'UNKNOWN' ELSE ' ');
 END
 -*
 -RUN
0 ERROR AT OR NEAR LINE     84  IN PROCEDURE blnewzrat_10319FOCEXEC *
 (FOC36355)  INVALID TYPE OF ARGUMENT #1 FOR USER FUNCTION YMD
 -*-----*  Connect to aPP_CODElicational databse ------------------------------*
 -*
 -* extract zero_at_soc_rep table
 TABLE FILE BLZATSOC
 PRINT SOC
 ON TABLE SAVE
 END
 -*
 -*---- Report Definition *-----------------------------------------*
 TABLE FILE ZEROAT
 HEADING
 -INCLUDE gnrphdr.fex



If someone can help me with this issue.

Thanks in advance

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS, Linux
Excel, CSV
September 05, 2017, 12:31 PM
j.gross
Change format of SDA and EDA from A6 to A6YMD.
September 05, 2017, 12:38 PM
Genius
hi,

Thanks a lot for ur help. the error is gone but it show me onewarning message as below

(FOC32584) WARNING: FILE SAVE IS EMPTY
is there any way to resolve it


-*
-*****************************************************************************
-*-SET &ECHO=ALL;
-*----------------------------------------------------------------------------
-SET &HOLDLINES=0;
-*----------------------------------------------------------------------------
END
-RUN

(FOC32584) WARNING: FILE SAVE IS EMPTY
+ [ 1 -ne 0 ]
+ sleep 1
ps -ef|grep $PID | grep $CHILD_PID | grep $RUN_T3I|wc -l+ ps -ef
+ grep 29630
+ grep 25714
+ grep blnewzrat_25714.t3i
+ wc -l
+ STOP_FLAG=1


Thanks


WebFOCUS, Linux
Excel, CSV
September 05, 2017, 12:40 PM
Hallway
Looking at the documentation, the from_date and to_date should be in
quote:
I, P, or A format with date display options.I6xxx or I8xxx where xxx corresponds to the specified function (DMY, YMD, or MDY).


So try changing your define as follows:
 
SDA/A6YMD=EDIT(STR_DATE,'$$99$$$$')|EDIT(STR_DATE,'$$$$99$$')|EDIT(STR_DATE,'$$$$$$99');
EDA/A6YMD=EDIT(END_DATE,'$$99$$$$')|EDIT(END_DATE,'$$$$99$$')|EDIT(END_DATE,'$$$$$$99'); 



Hallway

 
Prod: 8202M1
Test: 8202M4
Repository:
 
OS:
 
Outputs:
 
 
 
 
September 05, 2017, 12:54 PM
Hallway
Are you getting the error when it tries to cun this part of the code?
quote:
 -* extract zero_at_soc_rep table
 TABLE FILE BLZATSOC
 PRINT SOC
 ON TABLE SAVE
 END 


It so, does the table BLZATSOC have data in it?


Hallway

 
Prod: 8202M1
Test: 8202M4
Repository:
 
OS:
 
Outputs:
 
 
 
 
September 05, 2017, 01:49 PM
Genius
hi,

Yes getting error for this part of code only and yes BLZATSOC has no data its empty.
As even if its giving me warning its creating the report correctly.
can u help how can we resolve this error

Thanks

This message has been edited. Last edited by: Genius,


WebFOCUS, Linux
Excel, CSV
September 06, 2017, 09:47 AM
Genius
...


WebFOCUS, Linux
Excel, CSV
September 07, 2017, 01:19 PM
FP Mod Chuck
Genius

What is the purpose of this part of the code. If the file is known to be empty it is of no use and should be removed. Otherwise you need to populate that file with data.


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats