Home      Mainframe Forum      Mainfarme Tutorials      IBM Manuals      Mainframe Interview Questions      Mainframe Books      IT News     SiteMap     Downloads


     
 
MAINFRAME - TIP OF THE DAY : When you specified V for RECFM parameter, LRECL value is largest record in the file plus 4 bytes. These four bytes contain the actual length of each variable length record in the file

Google
 
Web mainframegurukul.com

Fetching two different transaction from a single file
Goto page 1, 2  Next
 
Post new topic   Reply to topic    mainframegurukul.com Forum Index -> DFSORT , ICETOOL & Utilities
  View previous topic :: View next topic  
Author Message
bputhirakond
Member


Joined: 17 Jan 2013
Posts: 8

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Thu Jan 17, 2013 4:59 pm    Post subject: Fetching two different transaction from a single file Reply with quote

Hi,

Can you tell me how to achieve this requierement in DFSort.

File contains a list of records with different transaction codes. However need to fetch only the transactions with transaction code of 24 followed by 64 or 26 followed by 64.

Thanks.
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.

NicC
Active Member


Joined: 24 Jul 2011
Posts: 650
Location: Down on the pig farm

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Fri Jan 18, 2013 1:58 am    Post subject: Reply with quote

Examples (both input and output), positions of key fields, lrecl recfm etc
_________________
Regards
Nic
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
bputhirakond
Member


Joined: 17 Jan 2013
Posts: 8

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Mon Jan 21, 2013 1:44 pm    Post subject: Reply with quote

Hi Nic,

Please find the details:

Record format : FB
Record length : 200
Key Field(Trans-Code) Position : 162 (Length : 2)
_________________
Thanks
Bala
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
William Collins
Active Member


Joined: 24 May 2012
Posts: 732

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Mon Jan 21, 2013 3:23 pm    Post subject: Reply with quote

Where is the sample data that was requested?
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
bputhirakond
Member


Joined: 17 Jan 2013
Posts: 8

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Wed Jan 23, 2013 1:45 pm    Post subject: Reply with quote

Hi,

Please find the sample data:
1)
14 TRAILER-REC 198/GRP
15 CODE 4/PS 084055
16 SUBCODE 2/NUM 0
17 REF-NO 4/PS 25086
18 SET-REF-NO 4/PS 718184
19 SET-SEQ-NO 4/PS 1
20 DATE 5/PS 20120722
21 TIME 4/PS 93223
22 TRANS-CODE 2/PS 64

2)

14 TRAILER-REC 198/GRP
15 CODE 4/PS 074005
16 SUBCODE 2/NUM 0
17 REF-NO 4/PS 25087
18 SET-REF-NO 4/PS 718184
19 SET-SEQ-NO 4/PS 2
20 DATE 5/PS 20120722
21 TIME 4/PS 91213
22 TRANS-CODE 2/PS 24

3)
14 TRAILER-REC 198/GRP
15 CODE 4/PS 073055
16 SUBCODE 2/NUM 0
17 REF-NO 4/PS 25088
18 SET-REF-NO 4/PS 718184
19 SET-SEQ-NO 4/PS 3
20 DATE 5/PS 20120722
21 TIME 4/PS 93213
22 TRANS-CODE 2/PS 64

4)

14 TRAILER-REC 198/GRP
15 CODE 4/PS 065345
16 SUBCODE 2/NUM 0
17 REF-NO 4/PS 25089
18 SET-REF-NO 4/PS 718186
19 SET-SEQ-NO 4/PS 5
20 DATE 5/PS 20120722
21 TIME 4/PS 91818
22 TRANS-CODE 2/PS 9

Here Trans-Code is key value for this requirement.

Thanks
Bala
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
DikDude
Moderator


Joined: 22 Jul 2011
Posts: 1001
Location: usa

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Wed Jan 23, 2013 10:31 pm    Post subject: Reply with quote

Hello,

And where is the output wanted from that input?
_________________
Have a good one
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
bputhirakond
Member


Joined: 17 Jan 2013
Posts: 8

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Wed Jan 23, 2013 11:19 pm    Post subject: Reply with quote

Hi,

Output file is same as input file length and same field structure.

Thanks
Bala
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
bputhirakond
Member


Joined: 17 Jan 2013
Posts: 8

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Fri Jan 25, 2013 1:14 am    Post subject: Reply with quote

Hi,

Output file should be like below

1)
14 TRAILER-REC 198/GRP
15 CODE 4/PS 084055
16 SUBCODE 2/NUM 0
17 REF-NO 4/PS 25086
18 SET-REF-NO 4/PS 718184
19 SET-SEQ-NO 4/PS 1
20 DATE 5/PS 20120722
21 TIME 4/PS 93223
22 TRANS-CODE 2/PS 64

2)

14 TRAILER-REC 198/GRP
15 CODE 4/PS 074005
16 SUBCODE 2/NUM 0
17 REF-NO 4/PS 25087
18 SET-REF-NO 4/PS 718184
19 SET-SEQ-NO 4/PS 2
20 DATE 5/PS 20120722
21 TIME 4/PS 91213
22 TRANS-CODE 2/PS 24
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
DikDude
Moderator


Joined: 22 Jul 2011
Posts: 1001
Location: usa

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Fri Jan 25, 2013 2:43 am    Post subject: Reply with quote

Please explain why those 2 "sets" of records were placed in the output file.

It is most unclear what the "rules" are.
_________________
Have a good one
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
bputhirakond
Member


Joined: 17 Jan 2013
Posts: 8

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Sun Jan 27, 2013 11:11 pm    Post subject: Reply with quote

Hi

That's my requirement : Need to fetch the transactions with transaction code 24 followed by 64. So my output looks above. Can you help me to achieve this.
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
NicC
Active Member


Joined: 24 Jul 2011
Posts: 650
Location: Down on the pig farm

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Mon Jan 28, 2013 2:49 am    Post subject: Reply with quote

You have not explained it clearly. Your first post says 24 or 26 followed by 64 but your output shows 64 followed by 24 and no sign of 26.
_________________
Regards
Nic
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
bputhirakond
Member


Joined: 17 Jan 2013
Posts: 8

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Tue Jan 29, 2013 12:59 am    Post subject: Reply with quote

Sorry Nic, I have framed the wrong output. Please find the correct one.

14 TRAILER-REC 198/GRP
15 CODE 4/PS 074005
16 SUBCODE 2/NUM 0
17 REF-NO 4/PS 25087
18 SET-REF-NO 4/PS 718184
19 SET-SEQ-NO 4/PS 2
20 DATE 5/PS 20120722
21 TIME 4/PS 91213
22 TRANS-CODE 2/PS 24

3)
14 TRAILER-REC 198/GRP
15 CODE 4/PS 073055
16 SUBCODE 2/NUM 0
17 REF-NO 4/PS 25088
18 SET-REF-NO 4/PS 718184
19 SET-SEQ-NO 4/PS 3
20 DATE 5/PS 20120722
21 TIME 4/PS 93213
22 TRANS-CODE 2/PS 64

3)
14 TRAILER-REC 198/GRP
15 CODE 4/PS 074010
16 SUBCODE 2/NUM 0
17 REF-NO 4/PS 25089
18 SET-REF-NO 4/PS 718185
19 SET-SEQ-NO 4/PS 6
20 DATE 5/PS 20120725
21 TIME 4/PS 91215
22 TRANS-CODE 2/PS 26

4)
14 TRAILER-REC 198/GRP
15 CODE 4/PS 073056
16 SUBCODE 2/NUM 0
17 REF-NO 4/PS 25089
18 SET-REF-NO 4/PS 718188
19 SET-SEQ-NO 4/PS 6
20 DATE 5/PS 20120723
21 TIME 4/PS 93214
22 TRANS-CODE 2/PS 64
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
NicC
Active Member


Joined: 24 Jul 2011
Posts: 650
Location: Down on the pig farm

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Tue Jan 29, 2013 1:37 am    Post subject: Reply with quote

So your input is groups of 9 records, each group starting with a record like '14 TRAILER-REC...' and ending with a record like '22 TRANS-CODE...' and if the TRANS-CODE record says 24 or 26 then you want to output this group and the next group IF the next group's TRANS-CODE is 64?
_________________
Regards
Nic
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
bputhirakond
Member


Joined: 17 Jan 2013
Posts: 8

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Wed Jan 30, 2013 2:53 pm    Post subject: Reply with quote

Hi Nic,

Yes, That's right.
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
William Collins
Active Member


Joined: 24 May 2012
Posts: 732

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Wed Jan 30, 2013 5:04 pm    Post subject: Reply with quote

From a Sort step, please post the ICE201I message.
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
Display posts from previous:   
Post new topic   Reply to topic    mainframegurukul.com Forum Index -> DFSORT , ICETOOL & Utilities All times are GMT + 5 Hours
Goto page 1, 2  Next
Page 1 of 2



 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Cobol Tutorial
This cobol tutorial covers most of the important topics like STRING, UNSTRING, COMP, COMP-3.....
DB2 Tutorial
DB2 Tutorial focuses on DB2 COBOL Programming. Explains in simple language. Some Chapters are locked, Forum members have free access to these chapters
CICS Tutorial
This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming...
JCL Tutorial
This is most popular JCL tutorial from mainframegurukul. It does contain important jcl ....
SORT Tutorial
This Tutorial covers all important aspects of DFSORT. Has more SORT examples
INTERVIEW Questions
This page covers important interview questions
Mainframe Jobs
Mainframe Jobs posted by members of mainframegurukul forum
FaceBook Page
MainframeGurukul FaceBook Page
LinkedIn Page
MainframeGurkul Linkedin Page

This widget requires Flash Player 9 or better







Go to top of the page
 

Online ABEND Reference ||  JCL References ||  COBOL References ||  VSAM References ||  Tutorials by Drona Series ||  SQL tutorial ||  BOOKS  ||  DB2 INTERVIEW QUESTIONS ||  COBOL INTERVIEW QUESTIONS  ||  JCL INTERVIEW QUESTIONS ||  JCL2 INTERVIEW QUESTIONS ||  VSAM INTERVIEW QUESTIONS ||  CICS INTERVIEW QUESTIONS  ||  Online tutorials ||  Online ABEND Reference ||  JCL References ||  COBOL References ||  VSAM References ||  Tutorials by Drona Series ||  SQL tutorial ||  BOOKS  ||  SiteMap  ||  Expeditor Tutorial  ||  FILE-AID Tutorial  ||  Changeman Tutorial  ||  COBOL   ||  DB2   ||  JCL  ||  CICS  ||  VSAM  ||  DB2 Interview Questions ( 110 )   || Simple JCL Tutorials  || JCL Tutorial from MainframeGurukul.com   || Simple JCL Tutorial - Chapter1 ;|| Mainframe Forum - Tutorials  || Mainframe Tutorials || Mainframe CICS tutorial|| Mainframe COBOL Tutorial

Drona Educational Forums - Mainframe Cobol DB2 CICS Board
Powered by phpBB

mainframetopic-6984.html