IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

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


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ABINAYATHULASI

New User


Joined: 28 May 2016
Posts: 3
Location: India

PostPosted: Sun May 29, 2016 11:15 am
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: 8696
Location: Dubuque, Iowa, USA

PostPosted: Mon May 30, 2016 3:36 am
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: 3
Location: India

PostPosted: Mon May 30, 2016 10:03 am
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 Member


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

PostPosted: Mon May 30, 2016 10:31 am
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: 8696
Location: Dubuque, Iowa, USA

PostPosted: Mon May 30, 2016 5:52 pm
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue May 31, 2016 2:51 am
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

Global Moderator


Joined: 21 Sep 2010
Posts: 3051
Location: NYC,USA

PostPosted: Tue May 31, 2016 9:58 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
Search our Forums:

Back to Top