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



Ah... you can't pass binary data as a parm to a CALL on a submit job command
and expect it to "behave".
Meaning, if you embed "binary" data in the middle of "text" the binary data
will be treated as the character equivalent of the binary data. Hence if
B'0125' is a QUOTE you will have a QUOTE in your parameter string. 
What can you do about it? Not much short of wrapping the call in something
that can read the data structure and then call the program; passing the data
as a parm via compiled-call will work, of course.
-Bob Cozzi


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Mike Wills
Sent: Monday, June 28, 2004 10:30 AM
To: Midrange_RPG400_L
Subject: Need Help On a Problem

I have this program that was worked flawlessly for a long time.
Recently, it has not been processing one of our spool files like it
should. Here is my code:

C                   Eval      DataQueue = WPQData                        
                                                                         
 /free                                                                   
  Cmd = 'SBMJOB CMD(CALL PGM(CUGPRCSMON) PARM(''' + DataQueue + ''')) ' +
         'JOB(PROCESSMON) JOBD(MONPDFJOBD) JOBQ(' + SBMJOBQ + ')';       
                                                                         
  #execClCmd(Cmd);     
 /end-free                                                  

DataQueue is a data structure. Here is the definition and data that is in
it.
D DataQueue       DS
D  Function                     10A                                   
    *SPOOL
D  RecType                       2A                                   
    01
D  JobName                      10A                                   
    Job Name
D  JobUserName                  10A                                   
    Job User Name
D  JubNumber                     6A                                   
    Job Number
D  SplfName                     10A                                   
    Spool File Name
D  SplfNumber                    8B 0                                 
    Spool File Number
D  OutqName                     10A                                   
    Output Queue Name
D  OutqLib                      10A                                   
    Output Queue Library

FUNCTION OF DATAQUEUE = '*SPOOL    '   
RECTYPE OF DATAQUEUE = '01'            
JOBNAME OF DATAQUEUE = 'GL221     '    
JOBUSERNAME OF DATAQUEUE = 'LAWSON7   '
JUBNUMBER OF DATAQUEUE = '112185'      
SPLFNAME OF DATAQUEUE = 'GL221_PRT '   
SPLFNUMBER OF DATAQUEUE = 00000125.    
OUTQNAME OF DATAQUEUE = 'LAWPDF    '   
OUTQLIB OF DATAQUEUE = 'QGPL      '    

Now when that gets into my SBMJOB, this is what it contians:
       ....5...10...15...20...25...30...35...40...45...50...55...60 
  1   'SBMJOB CMD(CALL PGM(CUGPRCSMON) PARM('*SPOOL    01GL221     '
 61   'LAWSON7   112185GL221_PRT    'LAWPDF    QGPL      ')) JOB(PR'
121   'OCESSMON) JOBD(MONPDFJOBD) JOBQ(LAW7PDF   )                 '

Note the " ' " in the middle of the parm. Like I said this has worked
flawlessly for almost 2 years, what is the corralation between the 125
and the single quote?

Could I define 'SplfNumber' as alpha and not have a problem when my
called program is recieving the exact same defined DS?

Thanks for any help!

-- 
Mike Wills
iSeries Programmer/Lawson Administrator
koldark@xxxxxxxxx
http://www.koldark.net
--
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.