IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to recieve week number from sysibm.sydummy in PL1


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ravi1

New User


Joined: 27 Apr 2006
Posts: 11

PostPosted: Fri Mar 13, 2009 12:39 pm
Reply with quote

Hi

I have coded

Exec Sql

week(current date)
into :ws_week_num
from sysibm.sysdummy1;

I am not getting correct value 11 in whatever data type i choose to declare ws_week_num. I am getting zeroes.

Please suggest how to declare ws_week_num.

Note: I already tried the following
fixed bin(31,0)
pic '9999'.
fixed dec(3)

Ur suggestions needed.
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 792
Location: Chennai, India

PostPosted: Fri Mar 13, 2009 2:51 pm
Reply with quote

FIXED BIN(15) works for me.

Code:
DCL                   
  WEEK1 FIXED BIN(15);

Code:
EXEC SQL                                 
     SELECT WEEK(CURRENT DATE) INTO :WEEK1
           FROM SYSIBM.SYSDUMMY1;         
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> PL/I & Assembler

 


Similar Topics
Topic Forum Replies
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Substring number between 2 characters... DFSORT/ICETOOL 2
No new posts Generate random number from range of ... COBOL Programming 3
No new posts Increase the number of columns in the... IBM Tools 3
No new posts Cobol program with sequence number ra... COBOL Programming 5
Search our Forums:

Back to Top