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
 
Formating of Amount field in CLIST before writing to output

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: Formating of Amount field in CLIST before writing to output
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

Senior Member


Joined: 21 Sep 2010
Posts: 2037
Location: NY,USA

PostPosted: Fri Aug 03, 2018 7:01 pm    Post subject:
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

Senior Member


Joined: 21 Sep 2010
Posts: 2037
Location: NY,USA

PostPosted: Fri Aug 03, 2018 7:38 pm    Post subject:
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

Senior Member


Joined: 14 Mar 2007
Posts: 10524
Location: italy

PostPosted: Fri Aug 03, 2018 7:43 pm    Post subject: Reply to: Formating of Amount field in CLIST before writing to output
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: 2100
Location: UK

PostPosted: Fri Aug 03, 2018 8:07 pm    Post subject: Reply to: Formating of Amount field in CLIST before writing to output
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

Senior Member


Joined: 21 Sep 2010
Posts: 2037
Location: NY,USA

PostPosted: Fri Aug 03, 2018 9:02 pm    Post subject:
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    Post subject:
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    Post subject:
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: 1790
Location: Bloomington, IL

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

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

Active User


Joined: 29 Apr 2008
Posts: 367
Location: Maryland

PostPosted: Sun Aug 05, 2018 1:54 am    Post subject: Re: Formating of Amount field in CLIST before writing to output
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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Replace comp-3 field value to comp-3 ... dharmaraok DFSORT/ICETOOL 5 Fri Sep 14, 2018 3:46 pm
No new posts Extra data in overlay field speermb DFSORT/ICETOOL 2 Thu Sep 13, 2018 6:04 pm
No new posts RPG II Problem with unsigned Packed d... Andi1982 All Other Mainframe Topics 6 Tue Sep 11, 2018 6:11 pm
No new posts Splitting one record in a file to 10 ... mf_123 DFSORT/ICETOOL 9 Tue Aug 21, 2018 8:51 pm
No new posts SMF IFAMGET macro GTPB_RETURNEDLENGT... ironheinrich7 IBM Tools 0 Thu Aug 02, 2018 6:53 pm

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