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
 

 

2 vsam file compare and update a field based on a condition

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
ABINAYATHULASI

New User


Joined: 28 May 2016
Posts: 2
Location: India

PostPosted: Sun May 29, 2016 11:15 am    Post subject: 2 vsam file compare and update a field based on a condition
Reply with quote

Hi All,

I have 2 vsam files with different structure and rec lengths
Vsam 1-Lrecl(210)-it will have only one record all times
Vsam 2-Lrecl(200)-No of records may change not constant

I have no common fields between these 2 files except filler fields which are empty both files have filler from recl 195(same for both files)

My functionality:

I have a field at pos 168 and length 5(pd) in vsam2 and if this is greater than field at pos 6 and length 5(pd) in vsam1 then vsam2 field 168,5 has to updated as 0.both these fields has date content in format yyyymmdd


I tried join condition but the field which I require to be joined is displaying as invalid(040404040c).I had gone thro almost all posts on join conditions and tried all possibilities but nothing was working
I am struggling to get ans for about 10days now. this is very urgent pls help me.this is my first post.i have tried to explain almost everything pls let me know if I missed something.i am sorry for any miss.
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7909
Location: Bellevue, IA

PostPosted: Mon May 30, 2016 3:36 am    Post subject:
Reply with quote

Why have you been struggling for 10 days to get a SORT solution working? Write a program in the language of your choice (COBOL would probably run 100 lines or so if you've given a full statement of what you want to do) and if you had done that from the start, you would have been done with this days ago.
Back to top
View user's profile Send private message
ABINAYATHULASI

New User


Joined: 28 May 2016
Posts: 2
Location: India

PostPosted: Mon May 30, 2016 10:03 am    Post subject: Reply to: 2 vsam file compare and update a field based on a condition
Reply with quote

My requirement is that I should write only in jcl that's y couldn't complete it icon_sad.gif
Back to top
View user's profile Send private message
steve-myers

Active User


Joined: 30 Nov 2013
Posts: 461
Location: The Universe

PostPosted: Mon May 30, 2016 10:31 am    Post subject:
Reply with quote

A task completed by DFSORT is not JCL. You are using JCL to run a program known as DFSORT.

All that JCL does is instruct the operating system to run a program (you propose to run DFSORT) and specify at least some resources the program needs to run. Period. End of story.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7909
Location: Bellevue, IA

PostPosted: Mon May 30, 2016 5:52 pm    Post subject:
Reply with quote

This CANNOT be done through JCL alone. You must use a program - COBOL or SORT or whatever - to do it. The requirement makes it sound like this is a student exercise, not a real-world problem.

Have you tried unloading both data sets into sequential data sets and working with the sequential data sets? The data you showed in your post looks like spaces converted to packed decimal. For us to help, you really need to post what you are doing (use the Code tag to preserve spacing) and at least a few records from each data set.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7228

PostPosted: Tue May 31, 2016 2:51 am    Post subject: Reply to: 2 vsam file compare and update a field based on a condition
Reply with quote

You must show your code. Some sample representative data, expected output, and what you get with that sample data. (cut the data down in size, of course).
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1609
Location: NY,USA

PostPosted: Tue May 31, 2016 9:58 pm    Post subject:
Reply with quote

Welcome!!
Did you care to look DFSORT Smart Tricks ? If yes then on page 17 it tells you what you should do and then you all have to use is IFTHEN on Reformatted record and Build as per your need.
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 Performing arithmetic on input field zh_lad DFSORT/ICETOOL 1 Tue Dec 06, 2016 8:04 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
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 -913/-911 Deadlock during UPDATE stat... NoSleep319 DB2 5 Fri Nov 18, 2016 12:37 am


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