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


     
 
MAINFRAME - TIP OF THE DAY : All available storage is assigned to the job or jobstep, If REGION is coded 0K or 0M

Google
 
Web mainframegurukul.com

Copying a VB record when certain conditions are met
Goto page 1, 2  Next
 
Post new topic   Reply to topic    mainframegurukul.com Forum Index -> EASYTRIEVE
  View previous topic :: View next topic  
Author Message
Sturminator
Member


Joined: 25 May 2012
Posts: 10

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

PostPosted: Fri May 25, 2012 5:01 pm    Post subject: Copying a VB record when certain conditions are met Reply with quote

I am trying to copy an entire VB record when certain conditions are met. It seems that I am only copy the data portion and not the 1st 4 bytes of the VB record. I am missing a small detail probably. Statements below: FILE FILEA
FA-ARG 01 06 N

FILE FILEB VB (1035 1039)
IN-REC 01 1035 A
REC-TYP 71 1 A
FB-ARG 325 06 N

FILE MTCHOUT VB (1035 1039)
OUT-REC 01 1035 A

JOB INPUT (FILEA KEY(FA-ARG) +
FILEB KEY(FB-ARG))

IF MATCHED AND REC-TYP = 'L'
OUT-REC = IN-REC
PUT MTCHOUT
END-IF
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: 651
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 May 25, 2012 5:49 pm    Post subject: Reply with quote

What makes you think that the RDW is NOT being processed considering that it does not show up in file displays in ISPF edit or browse?
_________________
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.
Sturminator
Member


Joined: 25 May 2012
Posts: 10

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

PostPosted: Fri May 25, 2012 5:54 pm    Post subject: Reply with quote

Yes. When I look at the input file all the way to the right it has 4 more columns ("Col") than the output record. Also, subsequent processing is not working I believe due to the data being 4 positions off.
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: 651
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: Sun May 27, 2012 10:59 am    Post subject: Reply with quote

Have you tried using your sort product to do the select/copy?
_________________
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.
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: Mon May 28, 2012 6:54 am    Post subject: Reply with quote

Hello,

When you write the "new" output record, the write will automatically insert the RDW before the application data. You should NOT try to manipulate the RDW.
_________________
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.
William Collins
Active Member


Joined: 24 May 2012
Posts: 714

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

PostPosted: Mon May 28, 2012 11:25 pm    Post subject: Reply with quote

Did you look at PUT xx FROM?

Or MOVE filename?

Or RECORD-LENGTH ?
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.
Sturminator
Member


Joined: 25 May 2012
Posts: 10

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

PostPosted: Tue May 29, 2012 4:46 pm    Post subject: Reply with quote

I have not tried the SORT program since it looked more complicated. With File Aid I am trying to read 1 file (FILE A) which has only 1 record and use the 1st 6 bytes to select records from FILE B. This part is working. My only problem is when the selected records are copied from the FILE B to the FILE MTCHOUT, output file FILE MTCHOUT drops the last 4 bytes of the file. I am not familiar with using variable block files in File Aid. My LRECL is 1039 and the 1st 4 are the RDW. So how do I specify that in File Aid and write the entire 1039 to the output file ?
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: 651
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 May 29, 2012 5:13 pm    Post subject: Reply with quote

file aid will know that it is a VB file and should do all the necessary stuff behind the scenes. You should be able to just concentrate on the data
_________________
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.
Sturminator
Member


Joined: 25 May 2012
Posts: 10

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

PostPosted: Tue May 29, 2012 5:16 pm    Post subject: Reply with quote

That is what I thought but it is not working. I must not be specifying something correctly in the statements. I have tried saying the record is 1035 in length and 1039 in length and neither works for me.
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.
Sturminator
Member


Joined: 25 May 2012
Posts: 10

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

PostPosted: Tue May 29, 2012 6:15 pm    Post subject: Reply with quote

Please note that it is the last 4 bytes that are missing; not the 1st 4 (RDW) like I originally thought. So it is some of the data that I am missing.
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: 714

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

PostPosted: Tue May 29, 2012 6:21 pm    Post subject: Reply with quote

Look, this is not FILEAID. It is Easytrieve Plus. Did you look at my previous reply?
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.
Sturminator
Member


Joined: 25 May 2012
Posts: 10

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

PostPosted: Tue May 29, 2012 6:36 pm    Post subject: Reply with quote

I did look at your previous reply and tried some of it and it didn't work. I am sorry that I am in the File Aid section here when (you are right) it is Easytrieve. My mistake. I will cease and desist with this and go to the Easytrieve postings.
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: Tue May 29, 2012 9:15 pm    Post subject: Reply with quote

You need to STOP posting "it didn't work" as this is totally useless for getting help . . .

When something does not work, you need to post the statement(s) used, the jcl, and the diagnostic info from the run (only the parts that are relevant). If the data created is not what you expect, show the data (in hex) for a record or 2. If the records are quite long, only post the parts that demonstrate the problem.

Originally a bit of code was posted, but as experiments were tried, the output from these (and the modified code) is needed for us to help.

Your duplicate post has been removed - this topic and all of the dialog are now in the Easytrieve part of the forum.
_________________
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.
Sturminator
Member


Joined: 25 May 2012
Posts: 10

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

PostPosted: Tue May 29, 2012 10:41 pm    Post subject: Reply with quote

JCL:

//FILEA DD DSN=&PREFDATE.URS.TRF016.IMAGE.DATECARD(0),DISP=SHR
//FILEB DD DSN=&PREFIN.URS.V600.TRF250.&INPUT(0),DISP=SHR
//*
//MTCHOUT DD DSN=&&CURBKDT,
// DISP=(,PASS),
// UNIT=SYSDA,
// SPACE=(27998,(1800,180),RLSE),
// DCB=(SYS2.DSCB,RECFM=VB,LRECL=1039,BLKSIZE=27998)


Easytrieve code:

FILE FILEA
FA-ARG 01 06 N

FILE FILEB VB (1035 1039)
IN-REC 01 1035 A
REC-TYP 71 1 A
FB-ARG 325 06 N

FILE MTCHOUT VB (1035 1039)
OUT-REC 01 1035 A

JOB INPUT (FILEA KEY(FA-ARG) +
FILEB KEY(FB-ARG))

IF MATCHED AND REC-TYP = 'L'
OUT-REC = IN-REC
PUT MTCHOUT
END-IF




End of 3 of the expected output records (actually input records since I expect an copy) in hex:

Line 00000000 Col 00956
Scroll ===> CSR
********************************


-------------------------------
................................
00000000000000000000000000000000
0000000C0000000C0000000C0000000C
-------------------------------
................................
00000000000000000000000000000000
0000000C0000000C0000000C0000000C
-------------------------------
................................
00000000000000000000000000000000
0000000C0000000C0000000C0000000C
-------------------------------



End of 3 of the received records in hex:

Line 00000000 Col 00952
Scroll ===> CSR
**********************************


-----------------------------------
....................................
000000000000000000000000000000000000
0000000C0000000C0000000C0000000C0000
-----------------------------------
....................................
000000000000000000000000000000000000
0000000C0000000C0000000C0000000C0000
-----------------------------------
....................................
000000000000000000000000000000000000
0000000C0000000C0000000C0000000C0000
-----------------------------------



Fields shown in hex and are packed decimal. The last field in each received record is missing its 2nd half.
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: Tue May 29, 2012 10:51 pm    Post subject: Reply with quote

Suggest you change the lrecl to 1035 and remove the blksize (in the JCL, not the code). Let us know what happens.

Edited for clarification.
_________________
Have a good one


Last edited by DikDude on Tue May 29, 2012 11:18 pm; edited 1 time in total
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 -> EASYTRIEVE 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

Related topics
 Topics   Replies   Author   Views   Last Post 
No new posts Query For IEBPTPCH 3 padmajeet.gaikwad 13445 Mon Feb 01, 2016 10:56 pm
academyindia4 View latest post
No new posts Unable to achieve below scenario using ICETOOL 27 sirianangel 33683 Mon Feb 01, 2016 10:01 pm
academyindia4 View latest post
No new posts Need to put records a Sorting order as mentioned below. 14 Yash1911 12633 Mon Jan 25, 2016 9:50 pm
academyindia4 View latest post
No new posts how to deal with the below scenario using iebgener 7 mainframes_6002 11170 Wed Dec 07, 2011 10:34 am
DikDude View latest post
No new posts Coulu someone explain the parameters in the below code? 1 lovely sweety 11352 Thu Jun 09, 2011 3:50 pm
dbzTHEdinosauer View latest post
 


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-6516.html