i'm stuck on how to move or display different value from different field in one line.
My output supposed to look like this
but for now, my output is look like this
This is my physical file
I have three field in physical file which are :
I have 2 dates, and basically i need the output to only have 2 line which one is 31 May, and the second one is 1 june. I tried to group them by doing the if condition but it didnt work. How I'm supposed to do? Please help me
Thanks in advance
//Add a logical for the table by date, exchange code
fcurexg2 if e k disk
**---------------------- start of your code
*LOVAL setll curexg
read curexg
dou %eof(curexg);
c eval @@date = exgdat
c exsr $GetVals
eval rrn = rrn + 1
write sfl01
// move to the next date
exgdat setgt curexg
read curexg
enddo
**------------------------
Begsr $GetVals; // runs for each code -- usd, eur, etc
@@gcod = 'USD'
exsr $GetGrat;
move @@grat USD
@@gcod = 'GBP'
exsr $GetGrat;
move @@grat GBP
@@gcod = 'EUR'
exsr $GetGrat;
move @@grat EUR
@@gcod = 'AUD'
exsr $GetGrat;
move @@grat AUD
@@gcod = 'SGD'
exsr $GetGrat;
move @@grat SGD
Endsr;
**------------------------
Begsr $GetGrat; //find the rate for that date and code
*like define curexg @@date
*like define exgcod @@gcod
*like define exgrat @@grat
clear @@grat
Chain (@@date: @@gcod) curexg2; //the new logical
if %found(curexg2);
@@grat = exgrat
endif
Endsr;
**------------------------