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
 

 

Where to declare PARM parameter in COBOL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
rahul4u

New User


Joined: 27 Apr 2006
Posts: 7

PostPosted: Mon May 15, 2006 4:14 pm    Post subject: Where to declare PARM parameter in COBOL
Reply with quote

Can you explain about the PARM parameter as well as where we declare it in cobol.
Back to top
View user's profile Send private message

unni_nss

New User


Joined: 20 Sep 2005
Posts: 19

PostPosted: Mon May 15, 2006 8:16 pm    Post subject: Re: Use of PARM= parameter
Reply with quote

hi,
PARM is used to supply run time value to your applcation program, instaed of SYSIN parameter, this is one of the methods that we can pass values to application program, but only strings are posisble.i mean, alphabets and alphanumerics.
1-100 characters are possible through excluding the paranthesis are possible using PARM.

//AB1234 JOB NOTIFY=&SYSUID
//STEP1 EXEC PGM=COB1,PARM='COBOL'
//STEPLIB DD DSN=MYPDS.PDS,DISP=SHR
//STEP2 EXEC PGM=CHKNG
//SYSIN DD *

23
24

/*
//
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Mon May 15, 2006 10:46 pm    Post subject: Re: Where to declare PARM parameter in COBOL
Reply with quote

rahul4u,


The JCL parm is defined in the LINKAGE SECTION. In the case below, the PARM_LEN will = 15 with a max length of 100. PARM-TEXT will contain the input parm data.

Code:


//JS00100  EXEC PGM=YOURPGM,PARM=?INPUT PARM DATA?



LINKAGE SECTION.                                       
                                                       
01  JCL-PARM.                                           
    03  PARM-LEN                PIC S9(04) COMP.   
    03  PARM-TEXT               PIC X(100).
           
PROCEDURE DIVISION USING JCL-PARM.                     
                                                       
    IF PARM-LEN > 0                                 
    THEN                                               
        PERFORM PROCESS-PARM-DATA THRU PROCESS-EXIT                          
    END-IF.                                             


Dave
Back to top
View user's profile Send private message
rahul4u

New User


Joined: 27 Apr 2006
Posts: 7

PostPosted: Tue May 16, 2006 11:02 pm    Post subject:
Reply with quote

thnk u very much
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts JTS parameter Shashank Chaubey JCL & VSAM 2 Thu Jul 13, 2017 4:15 pm
No new posts XML Parse for COBOL 5.2 Bhanu Praveen COBOL Programming 1 Sat Jul 08, 2017 8:58 pm
No new posts Dynamic output file creation in cobol... smileheal COBOL Programming 7 Thu Jun 15, 2017 10:53 pm
No new posts Include/omit with "ALL" pa... mgl DFSORT/ICETOOL 6 Wed Jun 14, 2017 2:31 pm
No new posts Search utility(3.14) using JCl and Cobol RKS3 COBOL Programming 12 Sat Jun 10, 2017 10:24 pm


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