×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




What does it say about it? i.e.what does it not like?

The source type is SQLRPGLE right?


Jon P

On Nov 27, 2023, at 5:46 PM, <dfreinkel@xxxxxxxxxxxxxxxxx> <dfreinkel@xxxxxxxxxxxxxxxxx> wrote:

I am writing a small program using **free.



The system is at v7.4 and the program is a SQLRPGLI one.



The compiler does not like the **free and therefor much of what follows.



Is there something I do not know about using **free that is causing my
issue?



TIA



Darryl Freinkel

A4G

Telephone: 770.321.8562 Mobile: 678.355.8562



**FREE



dcl-opt (*SRCDBG:*NODEBUGIO)



dcl-s wCmd char(1000) ;

dcl-s wCmdLen packed(15,5);

dcl-s wCreate_Date char(8);

dcl-s wCreate_date_ISO date(*ISO) ;

dcl-s wMember_name char(10);



dcl-pr qCmdExc extpgm ;

*n char(1000) options(*varsize) const ;

*n packed(15:5) const ;

end-pr ;



Exec sql declare FTPLOG scroll cursor for

Select MLNAME, MLCDAT from qtemp.FTPLOG ;



Exec sql Open FTPLOG;

Exec sql Fetch FIRST from FTPLOG into :WcREATE_DATE, :wMember_name;



DoW Sqlcod >= 0 and sqlcod <> 100;

wCreate_date_ISO = '20'

+ %subst(wCreate_Date:1:2)

+ '-'

+ %subst(wCreate_Date:3:2)

+ '-'

+ %subst(wCreate_Date:5:2);

if wCreate_date_ISO < %date() - %days(30);

wCmd = 'RMVM FILE(A4G_ECS/FTPLOG) MBR('

+ %trim(wMember_name)

+ ')';

wCmdLen = %len(%trim(wCmd)) ;

QcmdExc (wCmd:wCmdLen);

endif;



Exec sql Fetch NEXT from FTPLOG into :WcREATE_DATE,
:wMember_name;

enddo;



exec sql close FTPLOG;

*inlr = *on;





--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.



This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2026 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.