Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Compare yesterday's date to the one o... migusd SYNCSORT 8 Fri Sep 22, 2017 11:35 pm
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts Setting Font Type for XMIT satish.ms10 All Other Mainframe Topics 3 Fri Sep 15, 2017 10:01 pm
No new posts BUILD OUTFIL based on condition other... balaji81_k DFSORT/ICETOOL 13 Fri Sep 08, 2017 11:06 pm
No new posts Question related to Data dictionary f... rexx77 SYNCSORT 3 Thu Aug 31, 2017 7:23 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us