View previous topic :: View next topic
|
Author |
Message |
Anil Kumar Prajapati
New User
Joined: 09 Jul 2018 Posts: 5 Location: India
|
|
|
|
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 |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3048 Location: NYC,USA
|
|
|
|
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? |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3048 Location: NYC,USA
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
Quote: |
Select DEC(-50.0000,12,4) from table |
to what language and environment does the suggestion apply ??? |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
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 |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3048 Location: NYC,USA
|
|
|
|
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 |
|
|
Anil Kumar Prajapati
New User
Joined: 09 Jul 2018 Posts: 5 Location: India
|
|
|
|
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 |
|
|
Anil Kumar Prajapati
New User
Joined: 09 Jul 2018 Posts: 5 Location: India
|
|
|
|
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 |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
Why are you writing CLIST? |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2012 Location: USA
|
|
|
|
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 |
|
|
|