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
 

 

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 JTS parameter Shashank Chaubey JCL & VSAM 2 Thu Jul 13, 2017 4:15 pm
No new posts UNIT=AFF for Easytrieve code gandikk JCL & VSAM 7 Wed Jul 12, 2017 11:42 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


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