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
 
How do you pass a single quote as in linkage?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
jasorn

Active User


Joined: 12 Jul 2006
Posts: 154
Location: USA

PostPosted: Thu May 15, 2008 8:21 am    Post subject: How do you pass a single quote as in linkage?
Reply with quote

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
View user's profile Send private message

gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Thu May 15, 2008 9:10 am    Post subject:
Reply with quote

Hi,
I think this should work

Code:
PARM=('ABERH ''01'', YU TO')


Gerry
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Thu May 15, 2008 9:49 am    Post subject:
Reply with quote

Hi,
I should have said my test works.


Gerry
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Fri May 16, 2008 12:07 am    Post subject:
Reply with quote

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
View user's profile Send private message
jasorn

Active User


Joined: 12 Jul 2006
Posts: 154
Location: USA

PostPosted: Fri May 16, 2008 5:19 am    Post subject:
Reply with quote

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
View user's profile Send private message
jasorn

Active User


Joined: 12 Jul 2006
Posts: 154
Location: USA

PostPosted: Fri May 16, 2008 5:22 am    Post subject:
Reply with quote

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
View user's profile Send private message
mytags

New User


Joined: 28 Apr 2008
Posts: 63
Location: US

PostPosted: Fri May 16, 2008 9:05 am    Post subject:
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri May 16, 2008 11:53 am    Post subject:
Reply with quote

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
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Mon May 19, 2008 12:05 am    Post subject:
Reply with quote

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
View user's profile Send private message
jasorn

Active User


Joined: 12 Jul 2006
Posts: 154
Location: USA

PostPosted: Mon May 19, 2008 1:53 am    Post subject:
Reply with quote

mmwife,

I already posted that it worked...twice actually icon_smile.gif
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to convert 2 bytes into single by... pkmurali DB2 4 Fri May 25, 2018 1:41 pm
No new posts Linkage editor is part of COBOL, z/OS... ankit.jain COBOL Programming 5 Fri Apr 20, 2018 4:17 pm
No new posts SORT 3 files,extract specific fields ... Kiransr DFSORT/ICETOOL 13 Fri Mar 23, 2018 10:54 am
No new posts Formatting multiple records to a sing... Vignesh Sid SYNCSORT 3 Tue Nov 07, 2017 12:22 pm
This topic is locked: you cannot edit posts or make replies. Need help how to pass the ESP variabl... Venkichaitu JCL & VSAM 12 Thu Nov 02, 2017 3:53 am

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