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
 

 

How to convert cobol data type S9(11)V99 into Ezytrieve data

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
M.RAJAN

New User


Joined: 18 Jul 2005
Posts: 5
Location: chennai

PostPosted: Fri Apr 09, 2010 12:13 am    Post subject: How to convert cobol data type S9(11)V99 into Ezytrieve data
Reply with quote

Hi All,

I am trying to convert Cobol Data type S9(11)v99 into Ezytrieve data type. We have existing Cobol program just to reformat from One file to another. I want to convert Cobol program to Ezytrieve program. i almost done the program except these data type conversion.

Can you please someone help me to convert the data from S9(11)V99 into Ezytrieve format ? Below is the given layout for input file.

Input file:

9234234232500 CHENNAI
5343242422340 DELHI
8342424234320 MUMBAI

Expecting output file.

Number City

923423423250{ CHENNAI
534324242234{ DELHI
834242423432{ MUMBAI
Back to top
View user's profile Send private message

Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Fri Apr 09, 2010 1:02 am    Post subject: Reply to: How to convert cobol data type S9(11)V99 into Ezyt
Reply with quote

Unless you need a sign-nibble for the last-byte, move the S9(11)V99 field to a 9(11)V99 work-field and the sign-nibble will be dropped.

When signed (and I'm assuming positive), the last byte will be in the range of X'C0' through X'C9'.

Once you move it to an unsigned work-field, the range of the last byte will be X'F0' through X'F9', which is a format EZT can handle easily.

Bill
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Fri Apr 09, 2010 2:19 am    Post subject:
Reply with quote

Or define a mask on the EZT definition to account for the sign and the EZT display will be what you want....
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2435
Location: Netherlands, Amstelveen

PostPosted: Fri Apr 09, 2010 12:52 pm    Post subject:
Reply with quote

Your input looks like a zoned decimal field :

INFIELD 1 13 N MASK('99999999999.99')

Your output field looks like packed decimal :

UTFIELD 1 7 P 2

This will do the job :

UTFIELD = INFIELD
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: Fri Apr 09, 2010 7:16 pm    Post subject:
Reply with quote

Hello,

The posted "output" does not look like packed decimal. . .

Suggest that it signed zoned decimal.

Could the value ever be negative?
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2435
Location: Netherlands, Amstelveen

PostPosted: Fri Apr 09, 2010 7:42 pm    Post subject:
Reply with quote

dick scherrer wrote:
Hello,

The posted "output" does not look like packed decimal. . .

Suggest that it signed zoned decimal.



Thats right Dick, its signed zoned decimal (have to reread my posts).

So i guess the next applies :

UTFIELD 1 11 N 2

From the manual :

If you specify a numeric field with decimal positions (0 to 18),
CA-Easytrieve/Plus considers it a signed (quantitative) field.
Back to top
View user's profile Send private message
Sudheesh2008

New User


Joined: 23 Jun 2009
Posts: 1
Location: Charlotte

PostPosted: Mon Apr 12, 2010 9:36 am    Post subject: Reply to: How to convert cobol data type S9(11)V99 into Ezyt
Reply with quote

Hi All,

Thanks for the reply. The given value is not a packed decimel field. I am new to Ezytrieve and working hard to learn more. I am not aware of Mask definition and UTFIELD. Can you please give me the example and suggest/give me the good Ezytrive manual ?
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: Mon Apr 12, 2010 10:07 am    Post subject:
Reply with quote

Hello and welcome to the forum,

If your organization is licensed to use Easytrieve, all of the manuals may be downloaded for free from CA Support.

As this material is covered by copyright, we may neither post them nor link to them via our forum.

UTFIELD is a made-up name - it is not something from Easytrieve.
Back to top
View user's profile Send private message
naveensrimf

New User


Joined: 04 Oct 2005
Posts: 31

PostPosted: Fri Apr 16, 2010 1:49 am    Post subject: Reply to: How to convert cobol data type S9(11)V99 into Ezyt
Reply with quote

Cobol S9(11)V99 equalent in Easytrive is 13 N 2.
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: Fri Apr 16, 2010 1:55 am    Post subject:
Reply with quote

Hello,

It is close, but not exactly the same. . . .

The Easytrieve 13 N 2 field has the proper sign for negative numbers (D), but has an F-sign for positive numbers. Sometimes there is a want/need for a C-sign rather than an F-sign.

The COBOL field will have a C-sign when a value is computed.
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts copying data without knowing location arunsoods DFSORT/ICETOOL 6 Thu Jul 20, 2017 1:03 pm
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Loading data to table gives wrong for... Raghu navaikulam DB2 19 Thu Jul 13, 2017 2:11 pm
No new posts XML Parse for COBOL 5.2 Bhanu Praveen COBOL Programming 1 Sat Jul 08, 2017 8:58 pm
No new posts Convert CLIST to REXX cvnlynn CLIST & REXX 12 Tue Jun 27, 2017 2:06 am


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