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
 
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: 3
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: 8154
Location: East Dubuque, Illinois, USA

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: 3
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 Member


Joined: 30 Nov 2013
Posts: 564
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: 8154
Location: East Dubuque, Illinois, USA

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: 7315

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: 1788
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 Compare yesterday's date to the one o... migusd SYNCSORT 2 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 BUILD OUTFIL based on condition other... balaji81_k DFSORT/ICETOOL 13 Fri Sep 08, 2017 11:06 pm
No new posts Remove leading spaces from numeric field rexx77 SYNCSORT 6 Wed Sep 06, 2017 2:15 am
No new posts JES2 job size field matching Windows ... SRICOBSAS All Other Mainframe Topics 4 Tue Sep 05, 2017 5:49 pm

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