View previous topic :: View next topic
|
Author |
Message |
ESSPRABHU
New User
Joined: 11 Oct 2005 Posts: 22
|
|
|
|
Hi Friends,
i have one query, i have requirement like
i have one flat file(FILE1) having several number of records. this file was created thru program. my problem is, in this file i get one field which is number (0004567.000-)from 5 to 16 position. this field was delclared in cobol pgm like PIC ZZZZZZ9.999-.
so, i am copying this file to another file(FILE2) using some conditions with ICEMAN utility in jcl. so while copying the records from FILE1 to FILE2 using ICEMAN tool, i need to convert this field(5 to 16th posi) to Character mode(not in alphanumeric). Below i am giving the code.
Code: |
*Asume this file was FILE1(A.B.C)
----+----1----+----2----+----3----+----4----+----5
CDE COST CDE1 CDE2 CDE3
--- ------------ ---- ---- ------
SDF 0004567.000- LDJF LSDK WLL3KL * REC1
VDE 0000567.520- UAJF EKSS PLSJAD * REC2
DJF 0000000.000- FDFS SDSA DFDDSF * REC3
********************************************
|
so while i am copying from above file to another file(FILE2) , the COST field will convert to Char mode. any option is there with using ICEMAN or SORT card. before i done this in SORT card for converting from PD to ZD with using like
Code: |
5,12,ZD,EDIT=(SIIIIIIT.TTT)
|
But here i need to convert from Zero supression field to Char. i hope for this also we have like this option.
i need the FILE1 in the sameformat(Zero supression format using in cobol pgm). so that i am not touching the cobol program. so that i copying this file to another file. please help me with out changing my Cobol program(with using ICEMAN or SORT card in JCL).
Thanks in advance
-Prabhu |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
You have an existing COBOL probram that is outputting a numeric edited field with the leading zeros suppressed and trailing separate sign?
You want to alter that field so the leading zeros are put back?
Leading or trailing separate sign? |
|
Back to top |
|
|
ESSPRABHU
New User
Joined: 11 Oct 2005 Posts: 22
|
|
|
|
Hi William Thompson,
Thx for your reply.
Quote: |
You have an existing COBOL probram that is outputting a numeric edited field with the leading zeros suppressed and trailing separate sign?
|
Yes, my existing COBOL pgm was outputting a numeric edited field with the leading zeros suppressed and trailing separate sign
Like : 01 COST PIC ZZZZZZ9.999-.
Quote: |
You want to alter that field so the leading zeros are put back?
|
Yes, i want alter that field to CHAR mode using JCL ICEMAN or SORT tool.
Quote: |
Leading or trailing separate sign?
|
i want trailing Separate sign.
Please help me that which option i need to take in ICEMAN or SORT card for converting from numeric edited field with the leading zeros suppressed to Char mode.
-Prabhu |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Might the COBOL program be changed to output the proper picture? |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Like you have done before:
5,12,ZD,EDIT=(SIIIIIIT.TTT)
Instead of ZD, I think you can use SFF (signed free form numeric) for the source format. Use all Ts to force the zeros back in and S at the end for the trailing sign.
The SFF will remove the decimal, so you will have to put that into the edit mask too. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Prabhu,
I don't know COBOL, so I'm not sure what you have for input and what you want for output and the COBOL notation doesn't help me. Please show some examples of what your positive and negative input values look like and what you want the corresponding output values to look like, and I'll tell you how to do what you want with DFSORT. |
|
Back to top |
|
|
|