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
 
Query regarding Declaration

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
View previous topic :: :: View next topic  
Author Message
madhand

New User


Joined: 04 May 2005
Posts: 10

PostPosted: Mon Sep 10, 2007 1:52 pm    Post subject: Query regarding Declaration
Reply with quote

Hi

I have a requirement to concatenate a field in which negative sign is imbedded.Ex.,the value for the field is 000-109.Negative sign can be in any of the 7 positions.So I have declared as PIC '(6)-9'. The various records are concatenated properly.But the issue is the leading zeros are suppressed.
It has to be retained in my requirement.
Please let me know.
Thanks
Madhan.
Back to top
View user's profile Send private message

CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Mon Sep 10, 2007 3:22 pm    Post subject:
Reply with quote

What language?
Back to top
View user's profile Send private message
madhand

New User


Joined: 04 May 2005
Posts: 10

PostPosted: Mon Sep 10, 2007 3:43 pm    Post subject:
Reply with quote

PL/1
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Mon Sep 10, 2007 3:45 pm    Post subject:
Reply with quote

I'm guessing not doable, but I don't know PL/1....
Somebody who knows PL/1 will be along.......
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1105
Location: The Netherlands at Hole 19

PostPosted: Sun Sep 23, 2007 9:12 pm    Post subject:
Reply with quote

What if you base a characterfield, use the builtin INDEX for '-', replace it with '0'?
Back to top
View user's profile Send private message
Srihari Gonugunta

Active User


Joined: 14 Sep 2007
Posts: 295
Location: Singapore

PostPosted: Mon Sep 24, 2007 10:14 am    Post subject:
Reply with quote

INDEX can only be used on Strings. I suppose CHAR(6) will serve the purpose of preserving the leading zeroes and the sign in the middle also...
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1105
Location: The Netherlands at Hole 19

PostPosted: Mon Sep 24, 2007 4:24 pm    Post subject:
Reply with quote

Srihari Gonugunta wrote:
INDEX can only be used on Strings.


That's why I proposed to base a characterfield over it icon_idea.gif
Back to top
View user's profile Send private message
waneked

New User


Joined: 25 Sep 2007
Posts: 2
Location: switzerland

PostPosted: Thu Sep 27, 2007 2:20 pm    Post subject:
Reply with quote

Hi

this reason works with the enterprise compiler

dcl cField char (07);
dcl aField pic'(4)-999';

cField = ' - 000';
aField = translate(trim(cField,' '),'0',' ');
put skip data (aField);
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 -> PL/I & Assembler All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts reg query on DYNALLOC feature raghuraman123 SYNCSORT 12 Wed Jan 10, 2018 2:42 pm
No new posts query to fetch record which has only ... maxsubrat DB2 12 Mon Dec 11, 2017 5:03 pm
No new posts How to query MAXGENS of an existing P... Chuchulo Hatyzak JCL & VSAM 4 Wed Nov 22, 2017 10:23 pm
No new posts Native SQL Query kishpra DB2 1 Wed Nov 22, 2017 8:38 pm
No new posts Query on IEFBR14 with GDG Ashishpanpaliya JCL & VSAM 4 Tue Nov 07, 2017 8:34 pm

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