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
 
Need to get only the Data Part.

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

Active User


Joined: 20 Sep 2008
Posts: 102
Location: Bangalore

PostPosted: Mon Feb 23, 2009 9:49 am    Post subject: Need to get only the Data Part.
Reply with quote

Hi all,

I am having an input file which contains Header, trailer, Title an Data Part.

Could you guys please help me to get only the Data portion of the file into one file. For e.g:

Code:

The Report
Dated : 23/02/2008
SL No;Report Numeber;values
1;123456;2000
2;256488;2330
3;598654;1254
Total No - 3


So my o/p Should be like below,

Code:

1;123456;2000
2;256488;2330
3;598654;1254


Simillarly i just need another Sort card which will do the Vice versa,

Input File- 1

Code:

a;aaaaaa;1234
b;vvvvvv;2330
C;zzzzzz;1254


Input File 2

Code:

The Report
Dated : 23/02/2008
SL No;Report Numeber;values
1;123456;2000
2;256488;2330
3;598654;1254
Total No - 3


So my output should be like below,

Code:

The Report
Dated : 23/02/2008
SL No;Report Numeber;values
a;aaaaaa;1234
b;vvvvvv;2330
C;zzzzzz;1254
Total No - 3


That is it will copy the Data from File 2 and the header and trailer stuffs from File 1 and put in the O/P File.

Let all the files are Of FB and having LRECL=80.

If somebody is having sample sort cards please help me.
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: Mon Feb 23, 2009 9:51 pm    Post subject:
Reply with quote

How do we identify the "header and trailer stuffs" programmatically?

Is it the first three records and last record, or the records that don't have a semicolon in position 2, or what?
Back to top
View user's profile Send private message
Niki

Active User


Joined: 20 Sep 2008
Posts: 102
Location: Bangalore

PostPosted: Tue Feb 24, 2009 10:01 am    Post subject:
Reply with quote

Hi Frank,

Thanks for ur reply.

yes, It is the First three and the last record itself.
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: Tue Feb 24, 2009 10:02 pm    Post subject:
Reply with quote

You can use a DFSORT/ICETOOL job like the following for your first requirement:

Code:

//S1   EXEC  PGM=ICETOOL
//TOOLMSG   DD  SYSOUT=*
//DFSMSG    DD  SYSOUT=*
//IN DD DSN=...  input file
//OUT DD DSN=...  output file
//TOOLIN DD *
SUBSET FROM(IN) TO(OUT) REMOVE INPUT FIRST(3) LAST
/*


You can use a DFSORT/ICETOOL job like the following for your second requirement. Make sure OUT is a MOD data set.

Code:

//S2   EXEC  PGM=ICETOOL
//TOOLMSG   DD  SYSOUT=*
//DFSMSG    DD  SYSOUT=*
//IN1 DD DSN=... input file1 (has new data)
//IN2 DD DSN=... input file2 (has header/old data/trailer)
//*** OUT MUST BE A MOD DATA SET
//OUT DD DISP=MOD,DSN=...  output file (has header/new data/trailer)
//TOOLIN DD *
SUBSET FROM(IN2) TO(OUT) KEEP INPUT FIRST(3)
COPY FROM(IN1) TO(OUT)
SUBSET FROM(IN2) TO(OUT) KEEP INPUT LAST
/*
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 Copying part of the report using SARBCH Aedulla CA Products 0 Tue Oct 24, 2017 9:24 am
No new posts Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts opening a dataset after reading it fr... arunsoods DFSORT/ICETOOL 5 Wed Oct 04, 2017 3:54 pm
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 File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am

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