Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
code Cobol to access a parameter that defined in JCL

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

New User


Joined: 22 Apr 2009
Posts: 16
Location: Bangalore

PostPosted: Wed Jun 03, 2009 7:09 pm    Post subject: code Cobol to access a parameter that defined in JCL
Reply with quote

Hi,

How do you code Cobol to access a parameter that has been defined in JCL?

Please suggest me if i am wrong:

ans:

If it is SYSIN input in JCL,
ACCEPT <VARIABLE> FROM SYSIN
If it parameter is give through PARM, then COBOL program
should receive through LINKAGE SECTION

environment division

file1 assign to ddname
file2 assign to ddname

for this in JCL //DDNAME DD DSN.......

LINKAGE SECTION
01 LN-LEN PIC S9(4) COMP.
01 X PIC X
01 Y PIC X
IN JCL THROUGH PARM (MAX 1 TO 100 CHAR)

procedure division.

ACCEPT X
ACCEPT Y.

IN JCL THROUGH SYSIN DD*



Thanks,
Nisha
Back to top
View user's profile Send private message

Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Thu Jun 04, 2009 4:15 pm    Post subject:
Reply with quote

Hi,

Please browse through the Manuals on PARM or seach this forum on "PARM" under JCL part of the Forum.
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Thu Jun 04, 2009 4:45 pm    Post subject: Reply to: code Cobol to access a parameter that defined in J
Reply with quote

These will help you...

http://www.ibmmainframes.com/viewtopic.php?t=34167&highlight=
http://www.ibmmainframes.com/viewtopic.php?t=35086&highlight=param+length
http://www.ibmmainframes.com/viewtopic.php?t=37978&highlight=parm
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 KSDS and Index file in cobol deepak14450 COBOL Programming 9 Fri Dec 22, 2017 9:36 am
No new posts IBEGENER RETURN CODE 12 anilkumar922 All Other Mainframe Topics 5 Wed Dec 13, 2017 11:41 am
No new posts DUMMY When do I need add a DCB parameter Martylin JCL & VSAM 3 Fri Dec 08, 2017 7:20 am
No new posts Finding the plan when code compiled u... Ahemad DB2 1 Fri Dec 01, 2017 6:38 pm
No new posts Strange Code amitc23 COBOL Programming 6 Tue Nov 28, 2017 11:25 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us