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
 

 

Process file based on values stored in control card...

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

New User


Joined: 03 Jul 2006
Posts: 53

PostPosted: Wed Nov 23, 2011 10:08 pm    Post subject: Process file based on values stored in control card...
Reply with quote

Hello there.
I need to know if it's possible to process file based on values stored in second file.

Let's say control card file (80 bytes) has this MAX value (POS 1:4):
Code:
****** ***************************
=COLS> ----+----1----+----2----+--
000001 5000                       
****** ***************************


Main file to be processed has - key is POS 1:4
Code:
****** *****************************
=COLS> ----+----1----+----2----+----
000001 1111                         
000002 2222                         
000003 3333                         
000004 4444                         
000005 5555                         
000006 6666                         
000007 7777                         
000008 8888                         
000009 9999                         
****** ****************************


My output file should contain records where keys are greater than what's in control card:
Code:
****** ****************************
=COLS> ----+----1----+----2----+---
000001 5555                       
000002 6666                       
000003 7777                       
000004 8888                       
000005 9999                       
****** ****************************


Thank you.
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Wed Nov 23, 2011 10:27 pm    Post subject: Reply to: Process file based on values stored in control car
Reply with quote

If you have a look at this one it does the second part of your task,

For the control file value, you could have a step which generates a SYMNAME with the value from the control file and then use the SYMNAME in the subsequent step.
Back to top
View user's profile Send private message
sqlcode1

Active Member


Joined: 08 Apr 2010
Posts: 578
Location: USA

PostPosted: Wed Nov 23, 2011 11:40 pm    Post subject:
Reply with quote

rmd3003,
It can be done in multiple ways. What is the LRECL for the second file or what you called "Main file"?

Thanks,
Back to top
View user's profile Send private message
rmd3003

New User


Joined: 03 Jul 2006
Posts: 53

PostPosted: Thu Nov 24, 2011 12:09 am    Post subject:
Reply with quote

sqlcode1 wrote:
rmd3003,
It can be done in multiple ways. What is the LRECL for the second file or what you called "Main file"?

Thanks,


Control file (FILE1) is 80 byes long FB and has only one record - like a control card.
Second file (FILE2) is the file I want to process (504 bytes VB). It's huge - around 150 million records.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Thu Nov 24, 2011 12:23 am    Post subject:
Reply with quote

Here's a DFSORT job that will do what you asked for:

Code:

//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=...  control file (FB/80)
//SORTOUT DD DSN=&&S1,UNIT=SYSDA,SPACE=(TRK,(1,1)),DISP=(,PASS)
//SYSIN DD *
  OPTION COPY
  INREC BUILD=(C'TARG,',1,4,80:X)
/*
//S2 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SYMNAMES DD DSN=&&S1,DISP=(OLD,PASS)
//SORTIN DD DSN=...  input file (VB/504)
//SORTOUT DD DSN=...  output file (VB/504)
//SYSIN DD *
  OPTION COPY
  INCLUDE COND=(5,4,ZD,GT,TARG)
/*
Back to top
View user's profile Send private message
rmd3003

New User


Joined: 03 Jul 2006
Posts: 53

PostPosted: Thu Nov 24, 2011 12:34 am    Post subject: Reply to: Process file based on values stored in control car
Reply with quote

Frank, thank you very much.
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 Sorting of hex values Saurabh_mi DFSORT/ICETOOL 11 Thu May 25, 2017 3:49 pm
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am


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