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
This topic is locked: you cannot edit posts or make replies. Cobol GUI (like Editor) Kala Mainframe COBOL Programming 14 Wed May 10, 2017 12:30 pm
No new posts IMS T-Pipe queue counts in a COBOL Pr... Siva NKK Kothamasu IMS DB/DC 0 Tue May 09, 2017 6:31 pm
No new posts COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am
No new posts Cobol upgrade - source code missing f... gthmrj IBM Tools 1 Wed Apr 26, 2017 6:04 pm
No new posts COBOL Programming Sandpit? jodrisco COBOL Programming 6 Wed Apr 12, 2017 3:47 am


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