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
 
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 Extend the decimal values in DIVISION Balaryan DFSORT/ICETOOL 3 Thu Oct 05, 2017 4:05 pm
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts How to insert a value on specific pos... Poha Eater DFSORT/ICETOOL 9 Sun Oct 01, 2017 3:04 am

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