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
 

 

Input file keys are of different data type

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products
View previous topic :: :: View next topic  
Author Message
rgupta71

Active User


Joined: 21 Jun 2009
Posts: 160
Location: Indore

PostPosted: Sun Jul 12, 2009 8:16 pm    Post subject: Input file keys are of different data type
Reply with quote

Hi,All

I want to perform matching on keys but the problem is keys in both the datasets are of different data type.

Input file 1
U1 2 1 P

Input file 2
U2 1 2 A

How to do conversion before matching?
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Sun Jul 12, 2009 11:34 pm    Post subject:
Reply with quote

It would help if you gave some usefull information.

As this is posted in the CA products forum, are we to assume that your site uses CA-SORT.

What is the RECFM & LRECL of both files.
What are the key positions and lengths for both files.
What format are the keys to be compared.
What happens if (a) Keys match or (b) keys mismatch
Back to top
View user's profile Send private message
rgupta71

Active User


Joined: 21 Jun 2009
Posts: 160
Location: Indore

PostPosted: Mon Jul 13, 2009 12:54 am    Post subject:
Reply with quote

RECFM is FB
LRECL of both the datasets are different Infile1 is 80 & other is 120
The position of key is different in both the files
Infile 1
U1 2 1 P
P1 3 10 A

Infile2
U2 1 2 A
P2 5 10 A

The key to be matched is U1+P1 from Infile1 & U2+P2 from Infile 2.

I wrote
JOB INPUT (INFILE1 KEY ( U1 P1) + INFILE2 KEY (U2 P2) )

Job errored on the above line giving the error message that both the keys are not of same format
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 Jul 13, 2009 1:06 am    Post subject:
Reply with quote

Hello,

Appears to be an Easytrieve question. . .

Quote:
giving the error message that both the keys are not of same format
Yes, they are not the same.

You can either reformat the smaller volume file to use the attributes of the other or jou can replace the JOB INPUT specified with a JOB INPUT NULL and write your own matching code.
Back to top
View user's profile Send private message
rgupta71

Active User


Joined: 21 Jun 2009
Posts: 160
Location: Indore

PostPosted: Mon Jul 13, 2009 1:10 am    Post subject:
Reply with quote

Can u plz chk the below snippet. Will it work

JOB INPUT NULL
WS-U = U1
IF (( WS-U = U2 ) and ( P1 = P2 ))

PUT OUTFILE
END-IF


Thanks
Rahul Gupta
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 Jul 13, 2009 1:38 am    Post subject:
Reply with quote

Hello,

Quote:
Will it work
Most likely not. . . At least not completely. . .

There is nowhere the data is "gotten" from the files. There is no compare to see if the files are "high", "low" or equal.

At the top of the cobol forum is a "Sticky" of working code to do what i believe you want to do. You would need to incorporate that logic into the Easytrieve code.
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 -> CA Products 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 Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts Loading data to table gives wrong for... Raghu navaikulam DB2 18 Thu Jul 13, 2017 2:11 pm
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm


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