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 IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm
No new posts User access certification In Mainfram... Virendra Shambharkar All Other Mainframe Topics 4 Tue Oct 03, 2017 12:32 pm
No new posts Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 4 Tue Sep 26, 2017 3:07 am
No new posts Speed-up/reduce CPU use of code prino PL/I & Assembler 0 Tue Sep 26, 2017 12:05 am
No new posts how to see when the last read access ... Mike 1304 DB2 1 Tue Sep 12, 2017 7:52 pm

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