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



Just thought I'd throw in my two cents worth on parsing out the EDI
data...

I suggest you look into using REXX for parsing strings of data since it
is the best in the business, often easier to create and maintain than a
compiled language, can perform all the same functions of a compiled
language, is native on the AS/400, there are a zillion books written on
how to program in the language (even though most of them are for the VM
or MVS operating systems the language works essentially the same and IBM
creates good documentation and Redbooks for AS/400 REXX) and very speedy
and efficient even though it is an interpretive language.

I've seen some very sophisticated applications create in REXX.  I'm
using it now to easily automate FTPing on the AS/400.

Take care,

Dave Odom

>>> midrange-l-request@xxxxxxxxxxxx 2/11/2004 19:50:43 >>>
Send MIDRANGE-L mailing list submissions to
        midrange-l@xxxxxxxxxxxx 

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

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

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


Today's Topics:

   1. Re: Processing EDI stream file from Medicaid? (Rich Duzenbury)
   2. QtmmSendMail not sending to all addresses
(as400tech@xxxxxxxxxxx)
   3. OPNQRYF (Martin, Steve (MAN-Golden))
   4. RE: QtmmSendMail not sending to all addresses (Chris Bipes)
   5. Re: OPNQRYF (MWalter@xxxxxxxxxxxxxxx)
   6. Re: OPNQRYF (Peter Vidal)
   7. Re: QSH scripting (James Rich)
   8. Re: QSH scripting (pnelson@xxxxxxxxxx)
   9. RE: CLP to decide if DDM file is available? (Tom Liotta)
  10. RE: QSH scripting (Tom Liotta)


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

message: 1
date: Wed, 11 Feb 2004 15:07:42 -0600
from: Rich Duzenbury <rduz-midrange@xxxxxxxxxxxxxxxxxxx>
subject: Re: Processing EDI stream file from Medicaid?

On Wed, 2004-02-11 at 11:07, McIntyre Don wrote:
> Does anyone have experience in processing a Stream
> file without a line/carriage return on the iSeries?
> 
> This is an EDI type file from Medicaid.  It has the
> pipe bar(|) field seperator and a tilda ~ end of line
> indicator.
> 
> Would I need to process this via streaming text file
> using Java or can I do it via RPG or Cobol?
> 
> Thanks
> Don McIntyre
Don,

You can certainly do so with RPG -- have done it numerous times myself
over the years.  I recommend you upload the file to the IFS via FTP,
and
then use the IFS api's to get at the data, and then parse away.

I've done mainly two ways -- the first, where the parsing program just
parses the data and writes it to external physical files for later
processing, and the second where the parsing program also processes
the
data.  There are pluses and minuses to both approaches.

The Medicaid stream is probably ANSI X.12 format (remittances I'm
guessing), but IMO you can whip up your own stuff much easier than
trying to obtain an EDI translator.  Even if you use a translator, you
likely still have to massage the data to post it into your database.

Some of the hospital system vendors (like Siemens MS4, and I think
First
Coast) already provide solutions for parsing and posting government
EDI
files, so you might want to check into that before you (perhaps)
reinvent the wheel.


--
Regards,
Rich

Current Conditions in Des Moines, IA
Scattered Clouds
Temp 24.8F, Windchill 9.9F
Winds out of the North at 22mph







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

message: 2
date: Wed, 11 Feb 2004 15:10:44 -0600
from: as400tech@xxxxxxxxxxx 
subject: QtmmSendMail not sending to all addresses

    Greetings list,

    I have a program that uses the QtmmSendMail to send email. When I
    send to
    a corporate email address, i.e. name@xxxxxxxxxxxxx, it works fine
.
    When
    I try to send to one of our divisions,name@xxxxxxxxxxxxxxxxxxxxxx,
I
    get
    the following error:
     HOST my400 NOT ABLE TO DELIVER MAIL TO FOLLOWING RECIPIENT(S):
       <name@xxxxxxxxxxxxxxxxxxxxxx>
    RETRIES EXHAUSTED WHILE ATTEMPTING TO CONNECT TO REMOTE HOST
    DIVISION.
    This is all being sent from inside of the corporate firewall and I
am
    able to send to the name@xxxxxxxxxxxxxxxxxxxxxx from an outside
email
    address. 
    I have searched both the archives and the Infocenter and am not
able
    to
    find an answer to what is happening.
    Any help would be greatly appreciated.
    Thanks,
    Terry

-- 
http://www.fastmail.fm - IMAP accessible web-mail


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

message: 3
date: Wed, 11 Feb 2004 16:01:55 -0500
from: "Martin, Steve (MAN-Golden)" <Steve.Martin@xxxxxxx>
subject: OPNQRYF

I've looked through the archives, and I don't find an example of the
problem
I'm having. What I'm trying to do is OPNQRYF over 2 files. Here's
sample
code:

OVRDBF VCFVEH SHARE(*YES)

OPNQRYF FILE((PFVCF) (PFVEH)) FORMAT(VCFJVEH) QRYSLT(SCODE *EQ "RR")
JFLD((PFVCF/VCBLU PFVEH/SBLU *EQ)) OPNID(VCFVEH)

Notes: SCODE exists in PFVEH, and the format (VCFJVEH) is something I
just
made up - so is the OPNID and filename in OVRDBF.

The error I get upon execution is, CPF9899 - Field SCODE on QRYSLT
parameter
not found.

Does someone have a working example of OPNQRYF using 2 files, a QRYSLT,
and
KEYFLD's?

tia

Steve


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

message: 4
date: Wed, 11 Feb 2004 13:28:03 -0800
from: Chris Bipes <chris.bipes@xxxxxxxxxxxxxxx>
subject: RE: QtmmSendMail not sending to all addresses

Are you running two DNS servers?  One with inside addresses and one
with
your external addresses?  Sometimes the internal does not get updated
while
the external does.  First place to look.

Chris Bipes

-----Original Message-----
From: as400tech@xxxxxxxxxxx 

    Greetings list,

    I have a program that uses the QtmmSendMail to send email. When I
    send to
    a corporate email address, i.e. name@xxxxxxxxxxxxx, it works fine
.
    When
    I try to send to one of our divisions,name@xxxxxxxxxxxxxxxxxxxxxx,
I
    get
    the following error:
     HOST my400 NOT ABLE TO DELIVER MAIL TO FOLLOWING RECIPIENT(S):
       <name@xxxxxxxxxxxxxxxxxxxxxx>
    RETRIES EXHAUSTED WHILE ATTEMPTING TO CONNECT TO REMOTE HOST
    DIVISION.
    This is all being sent from inside of the corporate firewall and I
am
    able to send to the name@xxxxxxxxxxxxxxxxxxxxxx from an outside
email
    address. 
    I have searched both the archives and the Infocenter and am not
able
    to find an answer to what is happening.
  
  


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

message: 5
date: Wed, 11 Feb 2004 16:34:15 -0500
from: MWalter@xxxxxxxxxxxxxxx 
subject: Re: OPNQRYF


this one is pretty complex, I hope it helps

ovrdbf file(poblkt) share(*yes)
   opnqryf file(poblkt Pomast Itemasa Vennam) +
           format(Poblkt) +
           jfld((1/ordno 2/ordno) +
                (1/itnbr 3/itnbr) +
                (2/vndnr 4/vndnr)) +
           qryslt('(uucapb *ne "XXXX") *and +
                   (reprt *eq "' *cat &blktecode *tcat '")') +
           mapfld((invfg '1/invfg') +
                  (itnbr '1/itnbr') +
                  (uucapb '3/itcls') +
                  (adrft '1/adrft') +
                  (eadr '1/eadr') +
                  (actdt '2/actdt') +
                  (faxn '1/faxn') +
                  (frtal '1/frtal') +
                  (house '1/house') +
                  (latdt '1/latdt') +
                  (ordno '1/ordno') +
                  (pgedt '1/pgedt') +
                  (revnb '1/revnb') +
                  (scity '1/scity') +
                  (scntr '2/pstts') +
                  (shpnm '1/shpnm') +
                  (ship1 '1/ship1') +
                  (ship2 '1/ship2') +
                  (shpid '1/shpid') +
                  (shpzp '4/vndnr') +
                  (sn35 '4/vname') +
                  (sstac '1/sstac') +
                  (s135 '3/itdsc') +
                  (s235 '1/s235') +
                  (s335 '1/s335') +
                  (s435 '1/s435') +
                  (s535 '1/s535') +
                  (tract '1/tract') +
                  (turna '1/turna') +
                  (turnc '1/turnc') +
                  (turnn '1/turnn') +
                  (reprt '%sst(4/entps 1 1)') +
                  (mdate '1/mdate')) +
            keyfld(reprt uucapb itnbr ordno reldt)

Thanks,

Mark

Mark D. Walter
Senior Programmer/Analyst
CCX, Inc.
mwalter@xxxxxxxxxx 
http://www.ccxinc.com 


|---------+------------------------------->
|         |           "Martin, Steve      |
|         |           (MAN-Golden)"       |
|         |           <Steve.Martin@xxxxxx| 
|         |           m>                  |
|         |           Sent by:            |
|         |           midrange-l-bounces@m|
|         |           idrange.com         |
|         |                               |
|         |                               |
|         |           02/11/2004 04:01 PM |
|         |           Please respond to   |
|         |           Midrange Systems    |
|         |           Technical Discussion|
|         |                               |
|---------+------------------------------->
 
>------------------------------------------------------------------------------------------------------------------------------|
  |                                                                    
                                                         |
  |       To:       "'midrange-l@xxxxxxxxxxxx'"
<midrange-l@xxxxxxxxxxxx>                                               
        |
  |       cc:                                                          
                                                         |
  |       Subject:  OPNQRYF                                            
                                                         |
 
>------------------------------------------------------------------------------------------------------------------------------|




I've looked through the archives, and I don't find an example of the
problem
I'm having. What I'm trying to do is OPNQRYF over 2 files. Here's
sample
code:

OVRDBF VCFVEH SHARE(*YES)

OPNQRYF FILE((PFVCF) (PFVEH)) FORMAT(VCFJVEH) QRYSLT(SCODE *EQ "RR")
JFLD((PFVCF/VCBLU PFVEH/SBLU *EQ)) OPNID(VCFVEH)

Notes: SCODE exists in PFVEH, and the format (VCFJVEH) is something I
just
made up - so is the OPNID and filename in OVRDBF.

The error I get upon execution is, CPF9899 - Field SCODE on QRYSLT
parameter
not found.

Does someone have a working example of OPNQRYF using 2 files, a QRYSLT,
and
KEYFLD's?

tia

Steve
_______________________________________________
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx 
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l 
or email: MIDRANGE-L-request@xxxxxxxxxxxx 
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.








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

message: 6
date: Wed, 11 Feb 2004 16:52:40 -0500
from: "Peter Vidal" <Peter_Vidal@xxxxxxxx>
subject: Re: OPNQRYF


Steve, see this one:
OPNQRYF    FILE((ITEMASA) (ITEMASC)) FORMAT(ITEMASJ) +
             QRYSLT('ITTYP *EQ %VALUES("3" "4" "9") +
             *AND INVFG *EQ 1') KEYFLD((BUYNO) (ITDSC) +
             (ITNBR)) JFLD((ITEMASA/ITNBR +
             ITEMASC/ITNBR)) MAPFLD((ITNBR +
             'ITEMASA/ITNBR') (RECID 'ITEMASA/RECID'))

Peter Vidal
Pall Aeropower Corp.
SR Programmer Analyst
www.Pall.com 
"My religion consists of a humble admiration of the illimitable
superior
spirit who reveals himself in the slight details we are able to
perceive
with our frail and feeble mind."
Albert Einstein





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

message: 7
date: Wed, 11 Feb 2004 16:26:09 -0700 (MST)
from: James Rich <james@xxxxxxxxxxx>
subject: Re: QSH scripting

On Wed, 11 Feb 2004 pnelson@xxxxxxxxxx wrote:

> Everything is set to go on the Oracle box side, and commands entered
thru
> QSH actually worked as expected. The Unix programmer wants to build
a
> script to be able to automate the process.

So it looks like things are working and ready to go, you just want a
QSH
script to do them all for you.  If that is the case then you're all
set.
QSH scripting is just like UNIX scripting.  Just put all the commands
you
want to run in a file somewhere and then run the file.  For example,
make
a text file using your text editor of choice with the following lines
in
it:

#!/bin/sh
OLDDIR=`pwd`
NEWDIR='/home'
echo 'Changing to directory' $NEWDIR
cd $NEWDIR
pwd
ls
echo 'Changing back to directory' $OLDDIR
cd $OLDDIR
pwd
ls

Save this file as test.sh and put it on your as/400 in a directory
like
/tmp.  Then make it executable by starting up QSH and doing:

chmod u+x /tmp/test.sh

Then execute the script:

/tmp/test.sh

You should see some nice output about it changing directories and some
lovely file listings.

Of you will want to make a file (script) that has the commands you use
from QSH to do your job.  Anything you type in QSH can be put in a
script
and run.

James Rich

"As for security, being lectured by Microsoft is like receiving wise
words
on the subject of compassion from Stalin."
      -- mormop on lwn.net


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

message: 8
date: Wed, 11 Feb 2004 19:05:06 -0600
from: pnelson@xxxxxxxxxx 
subject: Re: QSH scripting

Here's the update. We created a directory under /usr named as400check.
The 
unix programmer created his routine in that directory. Here's what it 
looks like:

#Bill Vanderveen
#February 11, 2004
#This is a QSH script that will wrap to call to AS400CheckClient
#
# parameters:  1 - directory (of file being printed)
#              2 - filename (of file being printed)
#              3 - document type to be printed by Optio
if $# < 3
then
   echo "usage: optio directory filename doctype"
else
   java -Djava.security.policy=java.policy -classpath .:./public 
app.rbc.as400CheckClient.AS400CheckClient ${1} ${2} ${3}
fi

He gave me the exact command to push the check spool file to the unix
box, 
and I was able to create a CL program around it. I had to use EDTF to 
create the source, since this customer does not have PDM on the 
machine(what a pain). Forgive the appearance, as I pulled the blank
lines 
out of the source code. 

Does anybody know how to end the QSH interpreter? When I run this
program 
interactively, I end up at a command prompt telling me to press enter
to 
exit out of QSH.

PGM  
CPYSPLF     FILE(APP032) TOFILE(CHECKS) +  
JOB(696254/TKELSEY/AP_CHK_PRT) CTLCHAR(*NONE)  
  
CPYTOSTMF   FROMMBR('/QSYS.LIB/qgpl.LIB/checks.FILE/checks.MBR') +  
TOSTMF('/usr/as400check/checks.txt') STMFOPT(*REPLACE) +  
STMFCODPAG(*STDASCII)  
  
QSH CMD('java -Djava.security.policy=/usr/as400check/java.policy 
-classpath 
/usr/as400check:usr/as400check/public  
app.rbc.as400CheckClient.AS400CheckClient  
/usr/as400check checks.txt textpcl')  
ENDPGM  


Paul Nelson
Arbor Solutions, Inc.
708-670-6978  Cell
pnelson@xxxxxxxxxx 


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

message: 9
date: Wed, 11 Feb 2004 21:30:01 -0500
from: qsrvbas@xxxxxxxxxxxx (Tom Liotta)
subject: RE: CLP to decide if DDM file is available?

Art:

PING may tell you if there's an available route to the remote system,
but I don't know how to make it tell you if DDM is available. I'm not
sure any CL program can tell you that except for maybe something that
does a RUNRMTCMD and sends a WRKSBSJOB *PRINT across, then processes the
returned spooled file to see if the DDM job is listed. Not a trivial
task. And of course the remote command server must be active first.

Alternatively, I suppose you could do a copy from a DDM file and see
what happens. The CL could monitor for errors.

You might need to write an RPG program to actually connect via sockets
to the DDM server job to see what errors, if any, occur. I've done
similar things and it's a fair introduction to sockets programming.

But a CLP it ain't.

Tom Liotta

midrange-l-request@xxxxxxxxxxxx wrote:

>   5. CLP to decide if DDM file is available? (Art Tostaine, Jr.)
>
>We are using DDM over TCP/IP.  I need to know if the file is
available.
>Mostly we are interested in communications issues, we already handle
>times the file might not be available.
>
>Previously with SNA I would just check the device status.
>
>Now I guess I need to check PING results? 

-- 
Tom Liotta
The PowerTech Group, Inc.
19426 68th Avenue South
Kent, WA 98032
Phone  253-872-7788 x313
Fax    253-872-7904
http://www.powertech.com 


__________________________________________________________________
New! Unlimited Netscape Internet Service.
Only $9.95 a month -- Sign up today at http://isp.netscape.com/register

Act now to get a personalized email address!

Netscape. Just the Net You Need.


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

message: 10
date: Wed, 11 Feb 2004 21:50:00 -0500
from: qsrvbas@xxxxxxxxxxxx (Tom Liotta)
subject: RE: QSH scripting

Paul:

There are QShell reference manuals out there in the IBM maze. Of
course, they're nothing like tutorials even though they're a must for
reference.

I've been looking at a book through MC Press for a couple days, 'Qshell
for iSeries', by Ted Holt and Fred Kulack. Hot off the presses. ISBN:
1-58347-046-8

It seems an excellent textbook if IBM's technical reference isn't what
you need.

Tom Liotta

midrange-l-request@xxxxxxxxxxxx wrote:

>   3. QSH scripting (pnelson@xxxxxxxxxx)
>
>This might be the wrong list, but I've had a question regarding
scripting 
>in QSH. Anybody have any experience? Links to documentation?  Thanks.

-- 
Tom Liotta
The PowerTech Group, Inc.
19426 68th Avenue South
Kent, WA 98032
Phone  253-872-7788 x313
Fax    253-872-7904
http://www.powertech.com 


__________________________________________________________________
New! Unlimited Netscape Internet Service.
Only $9.95 a month -- Sign up today at http://isp.netscape.com/register

Act now to get a personalized email address!

Netscape. Just the Net You Need.


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

_______________________________________________
This is the Midrange Systems Technical Discussion (MIDRANGE-L) digest
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx 
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l 
or email: MIDRANGE-L-request@xxxxxxxxxxxx 
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.



End of MIDRANGE-L Digest, Vol 3, Issue 227
******************************************

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.