Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Convert from Zero supression format to Char

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Convert from Zero supression format to Char
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: 3158
Location: Tucson AZ

PostPosted: Fri May 18, 2007 9:29 pm    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Sat May 19, 2007 7:32 pm    Post subject:
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: 3158
Location: Tucson AZ

PostPosted: Sat May 19, 2007 8:57 pm    Post subject:
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 Moderator


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

PostPosted: Sun May 27, 2007 11:55 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to pick only YYMMDD from DATE1P (... atulbaviskar SYNCSORT 7 Wed Mar 22, 2017 11:39 am
No new posts Date and time format in CICS Chandru3183 CICS 2 Sat Mar 18, 2017 12:46 pm
No new posts Convert current to hex value gopurs DFSORT/ICETOOL 4 Wed Feb 15, 2017 5:40 am
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts Convert +9999999999999.99 to S9(12)V9(3) vnktrrd DFSORT/ICETOOL 8 Thu Nov 17, 2016 8:15 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us