IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Formating of Amount field in CLIST before writing to output


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Anil Kumar Prajapati

New User


Joined: 09 Jul 2018
Posts: 5
Location: India

PostPosted: Fri Aug 03, 2018 6:34 pm
Reply with quote

Formatting of Amount field in CLIST before writing to output - I am getting value from table as -50.0000 and while writing to file we want to write this amount value like -00000050.0000 in CLIST..Can some one please let me know solution with example.

Regards,
Anil Prajapati
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3048
Location: NYC,USA

PostPosted: Fri Aug 03, 2018 7:01 pm
Reply with quote

Quote:
We have a ISPF pannel that has many options .As per new requirement we have to add one more option and we need to update few fields in VSAM KSDS file by passing values from ISPF panel....Could you please help me how we can do this..Many many thanks in advance ....Please provide some examples
What is this though? Another question ? Part of your Signature? icon_eek.gif
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3048
Location: NYC,USA

PostPosted: Fri Aug 03, 2018 7:38 pm
Reply with quote

Quote:
I am getting value from table as -50.0000 and while writing to file we want to write this amount value like -00000050.0000 in CLIST..Can some one please let me know solution with example.

Test what happens below.
Code:
Select DEC(-50.0000,12,4) from table
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Fri Aug 03, 2018 7:43 pm
Reply with quote

Quote:
Select DEC(-50.0000,12,4) from table

to what language and environment does the suggestion apply ???
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Fri Aug 03, 2018 8:07 pm
Reply with quote

I suggest going through the CLIST manual and seeing what there is that looks as though it may do what you want. Then test out those possibilities. If none work then it probably cannot be done. Decades since I did CLIST.
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3048
Location: NYC,USA

PostPosted: Fri Aug 03, 2018 9:02 pm
Reply with quote

Quote:
to what language and environment does the suggestion apply ???
You're Right, Please delete it. I thought that's DB2 when OP said table.
Back to top
View user's profile Send private message
Anil Kumar Prajapati

New User


Joined: 09 Jul 2018
Posts: 5
Location: India

PostPosted: Sat Aug 04, 2018 8:53 pm
Reply with quote

Rohit Umarjikar wrote:
Quote:
to what language and environment does the suggestion apply ???
You're Right, Please delete it. I thought that's DB2 when OP said table.


my query was to format the amount field value extracted from table need to format before writing to output file using clist ,,,,
Select DEC(RND_TOT_AMT_PAYBL,12,4) from table
does not work.

please suggest the solution
Back to top
View user's profile Send private message
Anil Kumar Prajapati

New User


Joined: 09 Jul 2018
Posts: 5
Location: India

PostPosted: Sat Aug 04, 2018 9:04 pm
Reply with quote

please see if there is any option to edit the amount field to be edited while selecting row from table like -50.0000 to -000000050.0000
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Sat Aug 04, 2018 10:13 pm
Reply with quote

Why are you writing CLIST?
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2012
Location: USA

PostPosted: Sun Aug 05, 2018 1:54 am
Reply with quote

Anil Kumar Prajapati wrote:
Formatting of Amount field in CLIST before writing to output - I am getting value from table as -50.0000 and while writing to file we want to write this amount value like -00000050.0000 in CLIST..Can some one please let me know solution with example.

Regards,
Anil Prajapati

1) how your CLIST is invoked?
2) why you are using CLIST? Not REXX, COBOL, C, ALC, DB2, ...(150 other more convenient tools)?
3) what the "table" stands for, in your understanding? (DB2 table, IDMS table, ISPF table, Excel table, flat file, VSAM file, 100 other "tables"?)
4) what the "field" stands for in your understanding?
5) by means of what "you're getting the field from the table"?
6) by means of what "you're writing to file"?
7) what the "file" stands for in your understanding?
8) Where is any example of any source code you've tried to use?
9) Where is any example of your input data?
10) Where is any example of your "wrong output data"?
11) ... other 100 questions to follow ...

No one in this forum will try to guess the answers. If you need any (free!) help, then try to explain your problem in acceptable manner.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
No new posts Joinkeys - 5 output files DFSORT/ICETOOL 7
No new posts Two input files & writing counter... DFSORT/ICETOOL 12
Search our Forums:

Back to Top