Midrange News for the IBM i Community


Posted by: Mike Cunningham
setCookie
has no ratings.
Published: 04 Oct 2011
Revised: 23 Jan 2013 - 4101 days ago
Last viewed on: 14 Apr 2024 (6162 views) 

Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.

setCookie Published by: Mike Cunningham on 04 Oct 2011 view comments(4)

I can see a function in the service program named setCookie but there is no setCookie in the documentation file that came with xTools. Is there documentation on how to use setCookie?

Return to midrangenews.com home page.
Sort Ascend | Descend

COMMENTS

(Sign in to Post a Comment)
Posted by: bobcozzi
Site Admin ****
Chicagoland
Comment on: setCookie
Posted: 12 years 6 months 13 days 6 hours 46 minutes ago
Edited: Tue, 04 Oct, 2011 at 18:34:47 (4578 days ago)

Here's some RPG IV from the NOVA CMS system which I wrote to support his website:

 

 

     D expDate         S               Z   Inz

// Create a cookie with a timeout
  expDate = %timeStamp() + %Days(10);  // Expire in 10 days.
 setCookie('USERID'  : 'BOB' : expDate : '/;');


  // Create a Session Cookie, pass *OMIT for the expdate.
 setCookie('PWD' : 'ROSEBUD' : *OMIT   : '/;');

 

Posted by: clbirk
Premium member *
Comment on: setCookie
Posted: 12 years 6 months 12 days 15 hours 53 minutes ago

I prefer function 

 

eatCookie(chocolate chip);

 

instead...

Posted by: mcunning
Premium member *
Comment on: setCookie
Posted: 12 years 6 months 12 days 9 hours 15 minutes ago

Thanks Bob. Gave me what I needed. Could you add the eatCookie() function?  And maybe a buyCookie, bakeCookie, or stealCookie at the same time? 

Posted by: bobcozzi
Site Admin ****
Chicagoland
Comment on: setCookie
Posted: 12 years 6 months 11 days 15 hours 18 minutes ago
Edited: Thu, 06 Oct, 2011 at 10:03:04 (4576 days ago)

Okay, okay... how about this secret family recipe:

http://www.classanova.com/view?id=1407