how to get currnet date in jql command

  • EDA001
  • Topic Author
  • Visitor
  • Visitor
11 years 8 months ago #14934 by EDA001
can anyone help how can i get the current system date using jql statment.

like for example:

LIST F.HOLD.CONTROL WITH BANK.DATE EQ "CURRENT DATE" so that i cannot type the exact date every time i run the command.

Please Log in or Create an account to join the conversation.

  • jpb
  • jpb's Avatar
  • Offline
  • Moderator
  • Moderator
  • retired . . . ¯\_(ツ)_/¯
More
11 years 8 months ago #14937 by jpb
Replied by jpb on topic how to get currnet date in jql command
LIST F.HOLD.CONTROL EVAL'SUBR("ENQ.TRANS","DATES","XX0010001","TODAY")' AS TDAY @ WITH BANK.DATE EQ TDAY

Please Log in or Create an account to join the conversation.

  • jpb
  • jpb's Avatar
  • Offline
  • Moderator
  • Moderator
  • retired . . . ¯\_(ツ)_/¯
More
11 years 8 months ago #14938 by jpb
Replied by jpb on topic how to get currnet date in jql command
another way :

define a VOC, e.g.
File VOC , Record 'TDAY'
Command->
0001 I
0002 OCONV(@DATE,"DY4"):FMT(OCONV(@DATE,"DM"),"R%%"):FMT(OCONV(@DATE,"DD"),"R%%")
0003
0004 TODAY
0005 8L

and use TDAY in your jQL. (If a fieldname isn't found in the respective DICT it will be searched in VOC, as F0 F1 etc.).

Please Log in or Create an account to join the conversation.

  • EDA001
  • Topic Author
  • Visitor
  • Visitor
11 years 8 months ago #14943 by EDA001
Replied by EDA001 on topic how to get currnet date in jql command
THANK YOU

am able to select my record with the following statement

jsh t24inv2 ~ -->SELECT F.HOLD.CONTROL EVAL'SUBR("ENQ.TRANS","DATES","ET0010001","TODAY")' AS TDAY WITH BANK.DATE EQ TDAY AND REPORT.NAME EQ 'CRF.BOAGL'

91 Records selected

but using my current selection when i issue the LIST-ITEM command on &HOLD& i will encounter the following error.

>LIST-ITEM &HOLD&

** Error [ 202 ] **
Record '20131001' is not on file.

where '20131001' is the value held in the variable TDAY in the above JQL statment.


BUT when i issue the JQL command by fixing the BANK.DATE i can LIST-ITEM on &HOLD& directoy like the follwoing:


jsh t24inv2 ~ -->SELECT F.HOLD.CONTROL WITH BANK.DATE EQ '20131001' AND REPORT.NAME EQ 'CRF.BOAGL'

91 Records selected


>LIST-ITEM &HOLD&
***************************************************************************************
031
032 0030 CASH - TELLER CASH ACCT LCY 0.00 405,953.38 405,953.38
033 0060 CASH - STRONG ROOM -2,795,483.97 -1,035,718.88
035 0080 SUB TOTAL - CASH - LCY -2,795,483.97 -1,441,672.26
036
037 0090 CASH - IMPREST FUND -100.00 0.00
039 0100 SUB TOTAL - IMPREST FUND -100.00 0.00
040
041 0480 UNCLEARED EFFECTS - LOCAL -26,289.75 -1,655.58

*********************************************************************************************
so can you help ?

Please Log in or Create an account to join the conversation.

  • jpb
  • jpb's Avatar
  • Offline
  • Moderator
  • Moderator
  • retired . . . ¯\_(ツ)_/¯
More
11 years 8 months ago #14946 by jpb
Replied by jpb on topic how to get currnet date in jql command
With the second way this problem will not occur.

as you use SELECT (not LIST as in your first post) you can :

SELECT F.HOLD.CONTROL @ID EVAL'SUBR("ENQ.TRANS","DATES","ET0010001","TODAY")' AS TDAY WITH BANK.DATE EQ TDAY AND REPORT.NAME EQ 'CRF.BOAGL'
SELECT &HOLD& (R
LIST-ITEM &HOLD&
The following user(s) said Thank You: EDA001

Please Log in or Create an account to join the conversation.

  • EDA001
  • Topic Author
  • Visitor
  • Visitor
11 years 8 months ago #14958 by EDA001
Replied by EDA001 on topic how to get currnet date in jql command
Thank you very mcuh !!!! it works !!!

Please Log in or Create an account to join the conversation.

More
11 years 5 months ago #15411 by kda
Replied by kda on topic how to get currnet date in jql command
Hi
What is ET0010001?

Thanks

Please Log in or Create an account to join the conversation.

More
11 years 5 months ago #15413 by gm.saran
Replied by gm.saran on topic how to get currnet date in jql command
That's the lead COMPANY code. Check in your COMPANY records...

Please Log in or Create an account to join the conversation.

Time to create page: 0.035 seconds