Results 1 to 4 of 4

Thread: Pass the values to the PGM

  1. #1
    Junior Member
    Join Date
    Aug 2007
    Answers
    9

    Pass the values to the PGM

    which is the better way to pass the values to the PGM?is it through PARM parameter or Instream Procedure.anyone ans pls.....


  2. #2

    Re: Jcl

    Hi resh,
    seems you are having trouble with mainframes man!!!
    Anyway coming to your question,the only way you can pass values to your program via jcls is through the parm option used in instream proceedures (or optionally as a instream proceedure written in a different dataset called a sinlib).
    For e.g in your JCL suppose the name of the program you are executing is resh and you want to pass the string "123" then:
    //EXEC PGM=RESH,PARM="123"

    And then in your linkage section of your program you have to declare the following variables in a similar format:

    01 z-parm.
    03 z-length pic s9(04).
    03 z-value pic x(3).

    Declare proceedure division as :
    Procedure Division using z-parm.

    Your parm will be recieved in the variable z-value.

    p.s:if this doesnt work do let me know.:-)

    Last edited by mail_mathewsonyc; 08-31-2007 at 11:12 AM. Reason: Wrong spelling!!!

  3. #3
    Contributing Member
    Join Date
    May 2007
    Answers
    85

    Re: Pass the values to the PGM

    Whether you use parm or DD data is a factor of data size and reuse.

    Small variables not accessed anywhere else can be put in a parm.

    If you have to process a lot of data or the info has to be used elsewhere, use a DD.
    An example of this is a Datecard. While datecards are usually 1 line with 80 characters, many programs will need to know which days data they are processing.


    By the way instream procedures are in no way related to this.


  4. #4
    Junior Member
    Join Date
    Sep 2011
    Answers
    4

    Re: Pass the values to the PGM

    You can pass data to prgm using two methods 1. parm 2. control card (sysin)
    using parm u can pass up to 100 characters only. for large data use sysin


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact