Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Passing of parameters through Parm.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
varalakshmi.G

New User


Joined: 04 Jun 2007
Posts: 55
Location: Hyderabad

PostPosted: Wed Jun 20, 2007 7:44 am    Post subject: Passing of parameters through Parm.
Reply with quote

Hi,Could u tell me how to pass more than one parameter using PARM To
COBOL and also the changes to be made in COBOL.
Thank u in Advance.
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Jun 20, 2007 8:04 am    Post subject:
Reply with quote

Hello and welcome to the forums,

You will be ahead if you pass all of your information as one parm and redefine the parameter data in the linkage section into the multiple fields you need. You probably do not want to code for variable length and/or keyword parameters in your first parameter-using cobol program.

In the linkage section, define a level 01 like:.
Code:
       01  PARM-AREA.
           05 PARM-LTH    PIC 9(4) COMP.
           05 PARM-DATA.
              10 PARM-FLD-1  PIC ...
              10 PARM-FLD-2  PIC ...
             etc


Name the fields as you need them with appropriate pictures (preferable PIC X(n).
Back to top
View user's profile Send private message
Phrzby Phil

Active Member


Joined: 31 Oct 2006
Posts: 962
Location: Richmond, Virginia

PostPosted: Wed Jun 20, 2007 6:07 pm    Post subject:
Reply with quote

To slightly elaborate, I prefer to require the EXEC card parms to be separated by commas, and so I define fields for the commas and check for them. If they aren't there, then most likely the parms have been mis-specified, so I kill the run:

Code:
*=========================================
 LINKAGE SECTION.                         
*=========================================
                                         
 01  EXEC-PARM.                           
     05  EP-LEN           PIC S9(04) COMP.
     05  EP-PARM1         PIC X(06).     
     05  EP-COMMA1        PIC X.         
     05  EP-PARM2         PIC X(04).     
     05  EP-COMMA2        PIC X.         
     05  EP-PARM3         PIC X(08).     
     05  EP-COMMA3        PIC X.         
     05  EP-PARM4         PIC X(08).     


Code:
*********************************************************
 7400-PROCESS-EXEC-PARM-1.                               
*********************************************************
                                                         
      IF EP-LEN NOT = C-EXPECTED-LEN-EXEC-PARM           
          MOVE W-MSG-EP-INV-LEN TO P-MSG-CTL-ABEND-TXT   
          PERFORM 9910-EXEC-PARM-ERR                     
             THRU 9910-EPE-EXIT                         
      END-IF.                                           
                                                         
      IF    EP-COMMA1 NOT = ','                         
         OR EP-COMMA2 NOT = ','                         
         OR EP-COMMA3 NOT = ','                         
          MOVE W-MSG-EP-INV-COMMAS TO P-MSG-CTL-ABEND-TXT
          PERFORM 9910-EXEC-PARM-ERR                     
             THRU 9910-EPE-EXIT                         
      END-IF.                                           


Then proceed with checking the parm values.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts FTP - JCL failed while passing FTP co... Suneetha1612 JCL & VSAM 12 Wed Nov 16, 2016 7:33 pm
No new posts CICS NEW SIT PARAMETERS CICS BEHAVIOR... Kyle Carroll CICS 0 Fri Nov 04, 2016 11:55 pm
No new posts Using 'parm' to vary SORTOUT record v... Sysaron DFSORT/ICETOOL 13 Wed Sep 07, 2016 9:24 pm
No new posts Symbolic Parameters in SYSIN DD state... madishpa DFSORT/ICETOOL 3 Mon Jun 27, 2016 6:23 pm
No new posts Multiple parameters Csongor All Other Mainframe Topics 16 Thu Jun 09, 2016 7:54 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us