|
|
| Author |
Message |
jasorn
Active User
Joined: 12 Jul 2006 Posts: 110
|
|
|
|
Hello,
I want to pass single quotes in the parm for a cobol program. Can you do that? If so, what is the syntax?
Here is a version of what I want to pass.
pgm=program1,parm=('aberh '01', YHOU TO') |
|
| Back to top |
|
 |
References
|
Posted: Thu May 15, 2008 8:21 am Post subject: Re: How do you pass a single quote as in linkage? |
 |
|
|
 |
gcicchet
Active User
Joined: 28 Jul 2006 Posts: 295
|
|
|
|
Hi,
I think this should work
| Code: |
PARM=('ABERH ''01'', YU TO')
|
Gerry |
|
| Back to top |
|
 |
gcicchet
Active User
Joined: 28 Jul 2006 Posts: 295
|
|
|
|
Hi,
I should have said my test works.
Gerry |
|
| Back to top |
|
 |
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1470
|
|
|
|
Hi jasorn,
Can you show us what you want to "see" in the parm field of the COBOL pgm?
How many quotes and/or commas do you want to see and where? |
|
| Back to top |
|
 |
jasorn
Active User
Joined: 12 Jul 2006 Posts: 110
|
|
|
|
| gcicchet wrote: |
Hi,
I think this should work
| Code: |
PARM=('ABERH ''01'', YU TO')
|
Gerry |
Thanks. This is what I needed. Worked great. |
|
| Back to top |
|
 |
jasorn
Active User
Joined: 12 Jul 2006 Posts: 110
|
|
|
|
| mmwife wrote: |
Hi jasorn,
Can you show us what you want to "see" in the parm field of the COBOL pgm?
How many quotes and/or commas do you want to see and where? |
I wanted the cobol field to look like this: "ABERH '01', YUTO" The 2 single quotes in a row worked just fine. |
|
| Back to top |
|
 |
mytags
Active User
Joined: 28 Apr 2008 Posts: 60 Location: US
|
|
|
|
Hi
As my knowledege for passing Parameters from Jcl to Cobol we need to declare the length filed and corresponding data filed i mean x()field in the Linkage section of the Cobol, But the declaration of the length filed is must because system will consider the first field as a length filed so it will cause data truncation.
Thanks
hari |
|
| Back to top |
|
 |
dick scherrer
Global Moderator
Joined: 23 Nov 2006 Posts: 6756 Location: 221 B Baker St
|
|
|
|
Hello,
| Quote: |
| But the declaration of the length filed is must because system will consider the first field as a length filed so it will cause data truncation. |
I believe this is somewhat misleading. The first feld defined is where the system places the length discovered at run-time (i.e. PARM-LTH). As long as the parm data field(s) are defined properly, there will be no truncation. |
|
| Back to top |
|
 |
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1470
|
|
|
|
Hi jasorn,
Assuming there's a space required after the "H" and before the "Y", gcicchet's solution should do the trick.
Have you tried it?. Let us know the results. |
|
| Back to top |
|
 |
jasorn
Active User
Joined: 12 Jul 2006 Posts: 110
|
|
|
|
mmwife,
I already posted that it worked...twice actually  |
|
| Back to top |
|
 |
|
|