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

Convert from Zero supression format to Char


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ESSPRABHU

New User


Joined: 11 Oct 2005
Posts: 22

PostPosted: Fri May 18, 2007 8:39 pm
Reply with quote

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
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Fri May 18, 2007 9:29 pm
Reply with quote

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
View user's profile Send private message
ESSPRABHU

New User


Joined: 11 Oct 2005
Posts: 22

PostPosted: Sat May 19, 2007 9:16 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sat May 19, 2007 7:32 pm
Reply with quote

Hello,

Might the COBOL program be changed to output the proper picture?
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Sat May 19, 2007 8:57 pm
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Sun May 27, 2007 11:55 pm
Reply with quote

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
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Populate last day of the Month in MMD... SYNCSORT 2
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Need to convert date format DFSORT/ICETOOL 20
No new posts Exclude rows with > than x occurre... DFSORT/ICETOOL 6
Search our Forums:

Back to Top