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
 

 

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 RMM: scratching a volume that RMM thi... Hervey Martinez IBM Tools 0 Mon May 15, 2017 8:51 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 Group Data based on a key Arun Raj DFSORT/ICETOOL 7 Thu Apr 27, 2017 11:29 pm
No new posts unload data from table with lob columns farhad_evan DB2 0 Sat Apr 22, 2017 1:32 pm
No new posts SORT JSON type of data maxsubrat DFSORT/ICETOOL 8 Wed Apr 19, 2017 6:01 pm


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