ibm midrange - Simple RPG am rusty -


i want small rpg program rusty. it's similar sql recently.

i want read logical file, , select records todays date. field defined numeric 8 0. yyyymmdd way this? want read records = todays date. (job date ok ).

f filename etc.   d   data structure date     *** not sure how code this,    ds datein    d  year4in        d cent2        d yr2    d  month2in    d day2in ****  d ds dateout d  month2out d day2out d  yr2out  c   read loop        read filename until eof.                 move ordhdt datemanip                if ordhdt not equal udate                     leave                         else                              write record work file                        iter               end read loop. 

fmylf   if    e              k disk  d             ds d                   1   20  0 d  date                 1    8  0 d  time                 9   14  0 d  zzzzzz              15   20  0  c/free     = %dec(%timestamp());     setll date mylf;     reade date mylf;     dow not %eof(mylf);        // processing here.        reade date mylf;     enddo;     *inlr = *on; c/end-free 

and here's version may more comfortable with:

fmylf     if   e              k disk  dyyyymmdd        s               8  0 d                ds d time                      1    6  0 d date                      7   12  0 d mm                        7    8  0 d dd                        9   10  0 d yyyy                     11   14  0 d timedate                  1   14  0  c                   time      timedate c                   eval      yyyymmdd = (yyyy*10000) + (mm*100) + dd c      yyyymmdd     setll     mylf c      yyyymmdd     reade     mylf                                 99 c                   dow       *in99 = *off c* processing here c      yyyymmdd     reade     mylf                                 99 c                   enddo c                   eval      *inlr = *on 

Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -