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


  • Subject: Re: CMD-parm in SBMJOB
  • From: cmassoglia@xxxxxxxxxxx (Charlie Massoglia)
  • Date: Wed, 07 May 1997 19:30:30 -0400

>Hello everybody,
> 
>I want to inform you that since V3R2 and V3R7 there is a nice little problem 
>with long text-variables in CL-Programs submitted with SBMJOB CMD(Call xxx 
>('jshdfks')). 
> 
> I found this problem using a 40 character long variable used as an 
>input-parameter for an cl-program submitted. The variable contains at the 
>moment of the SBMJOB only blanks. The submitted program gets 34 blanks and 
>some data! If one would always read the fu... manuals, one would have known 
>this problem. Since this is due to the informtaion from software-support a new 
>one, I would have very much appreciated it, if IBM had decided to put this 
>change in behaviour in their "Important Changes in V3R2" memo. Hm, actually I 
>found the following excerpt in CL Programming V3R1. If this has been new to 
>V3R1, I haven't known it either?
> 
This restriction has been there forever.  There are several methods to
circumvent the problem.  In the calling program code the following:

         DCL     &VAR40  *CHAR  len(40)  /* Contains data to be passed */
         DCL     &VAR41  *CHAR  len(41)  /* Actually used to pass data */
/* Get value you want to pass in &VAR40, e.g. from a prompt screen */
         CHGVAR  &VAR41 VALUE(&VAR40 *CAT '*')
         SBMJOB  CMD(CALL PGM2 PARM(&VAR41)

In the called program, code the following:

         PGM     PARM(&VAR40)
         DCL     &VAR40   *CHAR  40

If you pass the character variable as one character larger than it needs to
be with the last character non-blank, you can receive the variable with the
correct length and you will not have any problems.

Another method of handling ALL parameter passing problems is to create a
command.  Do a SBMJOB of that command instead of a CALL.    


Charlie Massoglia, Massoglia Technical Consulting, Inc.
PO Box 1065, Okemos, MI 48854, USA
517-676-9700  Fax: 517-676-1006  EMAIL: cmassoglia@voyager.net


* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This is the Midrange System Mailing List!  To submit a new message,   *
* send your mail to "MIDRANGE-L@midrange.com".  To unsubscribe from     *
* this list send email to MAJORDOMO@midrange.com and specify            *
* 'unsubscribe MIDRANGE-L' in the body of your message.  Questions      *
* should be directed to the list owner / operator: david@midrange.com   *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


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.