On Wed, 26 Apr 2017 08:18:31 -0500, John McKown wrote:

>On Wed, Apr 26, 2017 at 7:55 AM, Bill Ashton wrote:
>>
>> I have some internal webpages (built from multiple systems) that contain
>> particular information that I want to capture in a batch job, and then I
>> will combine that with other data from other mainframe files. The easiest
>> way is to grab the webpage in m batch job, and then I can use Rexx or Sort
>> to parse through the HTML to get what I need.
>
>​Well, you could write an HTTP client in REXX using "REXX Sockets"
>https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.1.0/com.ibm.zos.v2r1.hala001/ipapirxa.htm
>
>But, being a lazy SOB (Swell Ol' Boy, that is), I'd use REXX and the
>bpxwunix() command to run the, optional, cURL command.
>
>/* REXX */
>STDIN.0=0
>STDOUT.0=0  /* Is this needed?  */
>STDERR.0=0  /* Is this needed?  */
>CURL='/usr/lpp/ported/bin/curl'
>cmd=curl" http://ibm.com";
>RC=BPXWUNIX(cmd,stdin.,stdout.,stderr.)
>do i=1 to stdout.0
>     ...
Since Bill mentioned Rexx first, fetching to a stem may be his preferred
technique -- he can do his processing in the same EXEC.  But I'm
surprised how few programmers choose the alternative path specifications
for BPXWUNIX (Rexx programmers seem fixated on stems).

Curl could write to a DDNAME allocated to a data set.

Curl output could be shell-redirected to a UNIX path.

After SYSCALL path P., curl output could be shell-redirected to P.2
and SORTIN could be BPXWDYN allocated to P.1  (BPXWUNIX should
put curl in the background ("&") for this to work.

etc.

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to