× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Stephane,

The _Cipher method is a tricky one.  It is an MI method and the
documentation for this method is only found in the MI programming book
(rather expensive and the last I saw, not available on PDF).  We use the
_Cipher method to return an MD5 of specific information.  Two issues that
you must consider.  First, the MD5 returned for data will return a hex value
(32 characters) representing 16 characters.  These characters may not have a
true character representation, so we end up saving the 32 character hex
value.  Second, we have found that, after quite a bit of testing, you can
not put calls to the _Cipher method in a service program.  When placed in a
service program there are some issues with saving subsequent calls and
creating the MD5 value.

Once you get the procedure down, the usage is quite easy.  You can easily
read the IFS file and add each data from the read to the _Cipher value.  At
the end of the file, you will request the MD5 value in return.  The _Cipher
method will save all of the data you sent to it until you request the MD5.
When you request the MD5, it will hash all of the data you sent in and
return the MD5.  We then save this data in a 32A field.

Mike

----- Original Message -----
From: "Stephane Leon" <s.leon@xxxxxxx>
To: "RPG programming on the AS400 / iSeries" <rpg400-l@xxxxxxxxxxxx>
Sent: Friday, February 28, 2003 3:03 AM
Subject: RE: Resolve pointer on ifs file


> The goal is to use _CIpher to get a md5 of ifs files.
> I put x'00' in file name, but with the same error.
>
> But maybe i posted the problem in a wrong way.
>
> How to get a md5 fingerprint for ifs files ?
>
> Md5 with string is ok.
> I need now to process in _Cipher a ifs file.
> Maybe later with *File.
> My approach was to put the resolved ifs pointer in _cipher
> and processed the md5 as usual.
>
> How can i do that ?
>
> I read ''ACCESS to IFS'' thread and only see is X'1E01'
> and its possible to resolve but don't see how.
> I don't know if ifs api can resolve my pb.
>
>
> Thanks.
>
> -----Message d'origine-----
> De : rpg400-l-bounces@xxxxxxxxxxxx
> [mailto:rpg400-l-bounces@xxxxxxxxxxxx]De la part de Scott Klement
> Envoye : jeudi, 27. fevrier 2003 23:11
> A : RPG programming on the AS400 / iSeries
> Objet : Re: Resolve pointer on ifs file
>
>
>
> Why are you trying to resolve a system pointer to an IFS object?  Why not
> use the IFS APIs?   The speed bottleneck will be in disk access, not the
> cost of calling the APIs.
>
> There was a long thread discussing IFS access on the MI400 list, back in
> Dec 2001 - Jan 2002.   There wasn't much RPG involved in the discussion,
> but perhaps it'll explain to you which MI functions you want to use, or
> convince you to skip the MI built-ins, and go for the APIs :)
>
> http://archive.midrange.com/mi400/200112/threads.html#00078
> http://archive.midrange.com/mi400/200201/threads.html#00000
>
>
> If you decide to use the APIs, I wrote an eBook on the subject which
> you can find here:
>
http://www.snap-ebooks.com/RPGIV%20and%20the%20Integrated%20File%20System.ht
> m
>
>
> On Thu, 27 Feb 2003, Stephane Leon wrote:
> >
> > I try to resolve a ptr on ifs.
> > I try with rslvsp but without library name.
> > So i try with _RSLVSP2 on this :
> >
> >  HBndDir('QC2LE')
> >
> >  DResolve_Ptr      PR                  EXTPROC('_RSLVSP2')
> >  D Ptr                                 Like(SysPtr)
> >  D Template                            Like(RslvTemplt) Const
> >
>
> [SNIP]
>
> _______________________________________________
> This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
> To post a message email: RPG400-L@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
> or email: RPG400-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/rpg400-l.
>
>
> _______________________________________________
> This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
> To post a message email: RPG400-L@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
> or email: RPG400-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/rpg400-l.
>
>



As an Amazon Associate we earn from qualifying purchases.

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-2024 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.