IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Where to declare PARM parameter in COBOL


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 2
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Generate random number from range of ... COBOL Programming 3
Search our Forums:

Back to Top