MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Passing Values to COBOL prgs.

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
sree_vats
Beginner


Joined: 06 Feb 2003
Posts: 1
Topics: 1

PostPosted: Mon Feb 17, 2003 12:59 am    Post subject: Passing Values to COBOL prgs. Reply with quote

Is there any way to pass a value from JCL to a COBOL prg other than PARM??????????????


Thankzzzzz
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12369
Topics: 75
Location: San Jose

PostPosted: Mon Feb 17, 2003 6:55 am    Post subject: Reply with quote

sree_vats,

Define a seqfile for the parm values

Code:

SELECT PARM-FILE                         
      ASSIGN TO PARMFIL     
      ORGANIZATION IS SEQUENTIAL.

FD  PARM-FILE                                     
    RECORDING MODE F                           
    LABEL RECORDS ARE OMITTED                 
    DATA RECORD IS PARM-REC.

01  PARM-REC.     
    05  PARM-VALUE              PIC  X(80).


Hope this helps...

cheers

kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Premkumar
Moderator


Joined: 28 Nov 2002
Posts: 77
Topics: 7
Location: Chennai, India

PostPosted: Mon Feb 17, 2003 7:11 am    Post subject: Reply with quote

or read sysin cards using ACCEPT verb.
Back to top
View user's profile Send private message Send e-mail
vallishar
Beginner


Joined: 17 Dec 2002
Posts: 53
Topics: 14
Location: BengaLuru

PostPosted: Mon Feb 17, 2003 11:12 am    Post subject: Reply with quote

I have used the Linkage Section to pass the parameters from the JCL using
PARM('the value to be passed').
_________________
If you're not failing every now and again, it's a sign you're not doing anything very innovative.
Back to top
View user's profile Send private message Yahoo Messenger
sujatharamana
Beginner


Joined: 14 Jan 2003
Posts: 3
Topics: 1
Location: IL,USA

PostPosted: Mon Feb 17, 2003 11:18 am    Post subject: Reply with quote

Kolusu,
Learnt a new thing.How will the JCL look like, to pass the parameter.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12369
Topics: 75
Location: San Jose

PostPosted: Mon Feb 17, 2003 11:41 am    Post subject: Reply with quote

sujatharamana,


Code:

//STEP0100 EXEC PGM=COBPGM
//*
//PARMFIL  DD DSN=YOUR PARM OTPIONS,
//            DISP=SHR
....

//*



Hope this helps...

cheers

kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Bugs
Beginner


Joined: 24 May 2003
Posts: 5
Topics: 1
Location: Indore

PostPosted: Sat May 24, 2003 9:03 am    Post subject: Reply with quote

Hi Kolusu !
I would definitely pass on my heartiest felicitations to you for such an informative site for all the Mainframe techies... Very Happy

I am curious to know if it is possible to pass the parm options into the file as a instream data as depicted below ?! 8) If yes, am I right when I say that the PARMFIL will have a LRECL of 80 ?!! Rolling Eyes

//STEP0100 EXEC PGM=COBPGM
//*
//PARMFIL DD *
my parm options
....
....
/*
Back to top
View user's profile Send private message Yahoo Messenger
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12369
Topics: 75
Location: San Jose

PostPosted: Sat May 24, 2003 9:51 am    Post subject: Reply with quote

Bugs,
Thanks for your participation on mvsforums.I am glad that you liked it. Pass it on your friends and co-workers.

Yes you can pass the data as instream data. The lrecl of PARMFIL will be 80 bytes as JCL defaults it to 80 bytes.

Kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
sathishgay
Beginner


Joined: 03 Feb 2005
Posts: 10
Topics: 2
Location: MUMBAI

PostPosted: Fri Feb 11, 2005 4:48 am    Post subject: Reply with quote

HI sree_vats

I have gone through one book .It states that data can be passed thru DLM PARAMER IN JCL .

THANKS AND REGARDS
SATHISHKUMAR
_________________
OK
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group