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



You have left out the "NoMonoPrc" process option.  Without that COBOL will
uppercase the name - which is where you get "SLEEP" from.  It _has_ to be
lower-case "sleep".

You still won't find it in the binding directory though - it is just a
procedure among a number of others in a service program.  I have no idea
which one it is in - as long as the binder can find it, I don't care <grin>

Jon Paris
Partner400

www.Partner400.com
www.RPGWorld.com

-----Original Message-----
From: cobol400-l-bounces@xxxxxxxxxxxx
[mailto:cobol400-l-bounces@xxxxxxxxxxxx]On Behalf Of Adrienne McConnon
Sent: Wednesday, October 26, 2005 3:05 PM
To: cobol400-l@xxxxxxxxxxxx
Subject: [COBOL400-L] sleep example - API calls replacing HP Intrinsic
calls


Jon,

Thanks so much for the example.  I did try the 'sleepytime' program but
still am having problems compiling.  Basically, I cannot find the
'SLEEP' object in any of the Binding directories in QSYS, including the
QC2LE binding directory.  As a matter of fact - all objects in all of
the binding directories in lib qsys all begin with the letter 'Q'.  Is
there something else I am missing here?  Also we are on v5r2 - if it
makes a difference.  How do I get the SLEEP object into QC2LE?

Thanks so much for your help!

Have a great day~

Adrienne McConnon

-----Original Message-----
From: cobol400-l-bounces@xxxxxxxxxxxx
[mailto:cobol400-l-bounces@xxxxxxxxxxxx] On Behalf Of
cobol400-l-request@xxxxxxxxxxxx
Sent: Monday, October 24, 2005 1:01 PM
To: cobol400-l@xxxxxxxxxxxx
Subject: COBOL400-L Digest, Vol 3, Issue 109

Send COBOL400-L mailing list submissions to
        cobol400-l@xxxxxxxxxxxx

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.midrange.com/mailman/listinfo/cobol400-l
or, via email, send a message with subject or body 'help' to
        cobol400-l-request@xxxxxxxxxxxx

You can reach the person managing the list at
        cobol400-l-owner@xxxxxxxxxxxx

When replying, please edit your Subject line so it is more specific
than "Re: Contents of COBOL400-L digest..."


Today's Topics:

   1. RE:  Applying a DDS (Garcia, Luis)
   2. RE:  HP 3000 to iSeries (Jon Paris)


----------------------------------------------------------------------

message: 1
date: Mon, 24 Oct 2005 10:39:58 -0500
from: "Garcia, Luis" <lgarcia@xxxxxxxxxxxxxxxxxxx>
subject: RE: [COBOL400-L] Applying a DDS

Thanks everybody,  my biggest problem was that I didn't have a file
description nor a DDS to see how fields were inside the record, to make
matters worst some fields were compress.  Thank God I found a couple of
DDS
and with those and a CONVERT command (which I'm guessing applies the DDS
format to the file) I manage to recover the information.

So thanks for all your input.

-----Original Message-----
From: cobol400-l-bounces@xxxxxxxxxxxx
[mailto:cobol400-l-bounces@xxxxxxxxxxxx] On Behalf Of Zangare Basil
Sent: Monday, October 24, 2005 7:12 AM
To: COBOL Programming on the iSeries/AS400
Subject: RE: [COBOL400-L] Applying a DDS

How about just simply creating a logical file and using that?  The way
you can key it anyway you want.

If the fields are defined in the file you would need to only define the
record format and key fields.  If it's a flat file you would have to
define the fields individually.

Using a logical file would allow you to use it over in other programs
without having to maintain a separate FD.  FD's have a tendency to get
out of sync after awhile, due to program mods, when the file is used in
other programs.



Basil Zangare
Applications Specialist
Nikon Inc
1300 Walt Whitman Road
Melville, New York 11747
phone: (631) 547-4389
fax: (631) 547-4026
bzangare@xxxxxxxxx


-----Original Message-----
From: cobol400-l-bounces@xxxxxxxxxxxx
[mailto:cobol400-l-bounces@xxxxxxxxxxxx] On Behalf Of Garcia, Luis
Sent: Friday, October 21, 2005 7:20 PM
To: COBOL Programming on the iSeries/AS400
Subject: [COBOL400-L] Applying a DDS

Is there a way to apply a DDS to a file created without the DDS? Or how
can
I access that data?

I got a file that was created without a DDS, I have a DDS but I don't
want
to write a program to read and write into another file, so I was
wondering
if it was a faster way?

Thanks

Luis
--
This is the COBOL Programming on the iSeries/AS400 (COBOL400-L) mailing
list
To post a message email: COBOL400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/cobol400-l
or email: COBOL400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/cobol400-l.


--
This is the COBOL Programming on the iSeries/AS400 (COBOL400-L) mailing
list
To post a message email: COBOL400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/cobol400-l
or email: COBOL400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/cobol400-l.


------------------------------

message: 2
date: Mon, 24 Oct 2005 12:09:51 -0400
from: "Jon Paris" <Jon.Paris@xxxxxxxxxxxxxx>
subject: RE: [COBOL400-L] HP 3000 to iSeries

I understand your confusion over APIs/functions.

We tend to think of C library and other callable functions as APIs even
if
they are not strictly documented as such.  API means Application
Programming
Interface (or some variant of those words) so anything supplied by the
system that can be called is an API.

There are two type of call on the system
- program level calls - otherwise known as dynamic calls.
- procedure level calls - otherwise known as bound calls.

APIs such as QCMDEXC are in the former category.  Such calls can only
return
information to the caller by modifying a parameter.  C-style function
calls
such as sleep are bindable APIs and can return values.

Here's an example of sleep - _not_ tested and it is a long time since I
coded COBOL so ....

           PROCESS nomonoprc

       PROGRAM-ID.   SleepyTime.

       ENVIRONMENT DIVISION.

       DATA DIVISION.

       WORKING-STORAGE SECTION.

       77 sleep-time           Pic 9(9) binary value 5.
       77 result               Pic S9(9) binary.

       PROCEDURE DIVISION.

       main-paragraph.

           DISPLAY "Going to sleep now"

           CALL PROCEDURE "sleep"
               USING   sleep-time
               GIVING  result.

           IF result = -1
               DISPLAY "Cannot get to sleep!"
               PERFORM error-routine
           END-IF.

           DISPLAY "Time to wake up!".

           STOP RUN.


       error-routine.
           DISPLAY "Rats - it didn't work - I wonder why?"


The "Process nomonoproc" is needed to ensure that "sleep" is the
function we
use and not "SLEEP".

The "CALL PROCEDURE" defines this as a bound call - not a dynamic call.
There is a process option that you can use (LINKPRC I believe) that will
make PROCEDURE the default - if you use that then calls to a program
would
be CALL PROGRAM.

In order to allow the binder to locate sleep you will need to specify
Binding Directory QC2LE to the CRTBNDCBL command.  QC2LE is the binding
directory supplied with the C compiler and may be used to locate most
any of
the C-style APIs - including all of the Unix-style IFS APIs etc.

Note that if a C-type call fails you need to call __errno to find out
why -
this involves defining based fields in Linkage and I'm afraid I don't
have
time to dig up an example.

P.S. Please when you respond to messages in a digest _change_ the
subject
back to something meaningful - it will help the next HP exile locate the
info they need in the archives.  talking of the archives, you will find
some
of the info on C function calls there, and also in the COBOL forum at
www.iseriesnetwork.com


Jon Paris
Partner400

www.Partner400.com
www.RPGWorld.com




------------------------------

--
This is the COBOL Programming on the iSeries/AS400 (COBOL400-L) digest
list
To post a message email: COBOL400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/cobol400-l
or email: COBOL400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/cobol400-l.



End of COBOL400-L Digest, Vol 3, Issue 109
******************************************


--
This is the COBOL Programming on the iSeries/AS400 (COBOL400-L) mailing list
To post a message email: COBOL400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/cobol400-l
or email: COBOL400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/cobol400-l.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.