IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

selecting data from 2 files into 1 file : EASYTRIV


IBM Mainframe Forums -> CA Products
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
t5590ag

Active User


Joined: 21 May 2009
Posts: 139
Location: United States

PostPosted: Thu Jan 21, 2010 4:11 pm
Reply with quote

Hi,
I have 2 input files- P18DCTS and P18DCTB -700FB
output file- 133FB
For a single master in DCTB I have single detail in DCTS.We can say it vice versa as well cos we have 1 on 1 relationship.
Following EASYTRIV code I am using-
Code:
*                                         
 FILE P18DCTS   FB (700 0)               
 IN-REC-1                        1  700 A
 IN-REF                          1   30 A
 IN-ORIG                        31   07 A
 IN-DEST                        38   07 A
 IN-MISC-DATA-1S                45   31 A
 IN-BOL                         76   16 A
 IN-MISC-DATA-2S                92  142 A
 IN-PICKUP-CITY                234   30 A
 IN-PICKUP-STATE               264   02 A
 IN-PICKUP-CNTRY               266   03 A
 IN-DELV-CITY                  269   30 A
 IN-DELV-STATE                 299   02 A
 IN-DELV-CNTRY                 301   03 A
 IN-MISC-DATA-3S               304   18 A
 IN-D-ARR-PICKUP               322   10 A
 IN-MISC-DATA-4S               332   70 A
 IN-D-ARR-DELV                 402   10 A   
 IN-MISC-DATA-5S               412  289 A   
*                                           
 FILE P18DCTB   FB (700 0)                 
 IN-REC-2                        1  700 A   
 IN-MISC-DATA-1B                 1  513 A   
 IN-C-CARR-SCAC                514   04 A   
 IN-MISC-DATA-2B               518   18 A   
 IN-C-FAST-CSA                 536   01 A   
 IN-MISC-DATA-3B               537  164 A   
*                                           
 FILE CSAREPT   FB (133 27930)             
 OUT-CSAREPT                     1  133 A   
 FILLER1                         1   01 A   
 OUT-RPT1-CNT-NUM                2   30 A   
 FILLER2                        32   01 A   
 OUT-RPT1-INV-NUM               33   16 A   
 FILLER3                        49   01 A
 OUT-RPT1-CSA-LOAD              50   01 A
 FILLER4                        51   04 A
 OUT-PICKUP-DATE                55   10 A
 FILLER5                        65   01 A
 OUT-RPT1-SHPR-NAME             66   07 A
 FILLER6                        73   01 A
 OUT-RPT1-SHPR-CITY             74   15 A
 FILLER7                        89   01 A
 OUT-RPT1-SHPR-STATE            90   02 A
 FILLER8                        92   04 A
 OUT-RPT1-CONS-NAME             96   07 A
 FILLER9                       103   01 A
 OUT-RPT1-CONS-CITY            104   12 A
 FILLER10                      116   01 A
 OUT-RPT1-CONS-STATE           117   02 A
 FILLER11                      119   04 A
 OUT-RPT1-DELV-DATE            123   10 A
 FILLER12                      133   01 A
*                                       
********************** WORKING STORAGE SE
*                                       
 WRITE-FILE-SW              W         1 A
 DLT-CTR                    W         2 P
*                                       
************************ PROCEDURE DIVISI
*                                       
*  SELECT ONLY OCEAN CLEARANCE (530 CL) A
*  RECORDS FROM SAP EXTRACT FILE. WRITE T
*  OUTPUT FILE.                         
*****************************************
*                                       
 JOB INPUT P18DCTS                       
 JOB INPUT P18DCTB                       
                                           
   MOVE SPACES TO OUT-CSAREPT             
   OUT-RPT1-CNT-NUM       = IN-REF         
   OUT-RPT1-INV-NUM       = IN-BOL         
   OUT-RPT1-CSA-LOAD      = IN-C-FAST-CSA 
   OUT-PICKUP-DATE        = IN-D-ARR-PICKUP
   OUT-RPT1-SHPR-NAME     = IN-ORIG       
   OUT-RPT1-SHPR-CITY     = IN-PICKUP-CITY
   OUT-RPT1-SHPR-STATE    = IN-PICKUP-STATE
   OUT-RPT1-CONS-NAME     = IN-DEST       
   OUT-RPT1-CONS-CITY     = IN-DELV-CITY   
   OUT-RPT1-CONS-STATE    = IN-DELV-STATE 
   OUT-RPT1-DELV-DATE     = IN-D-ARR-DELV 
   PUT CSAREPT                             
*                                         


I am getting following error while execution-
Code:
     83    OUT-RPT1-CONS-STATE    = IN-DELV-STATE                 
     84    OUT-RPT1-DELV-DATE     = IN-D-ARR-DELV                 
     85    PUT CSAREPT                                             
     86 *                                                         
        *******B062 FIELD REFERENCED IN UNAVAILABLE FILE - P18DCTS
        *******B063 FIELD REFERENCED WAS - IN-D-ARR-DELV           
        *******B063 FIELD REFERENCED WAS - IN-D-ARR-PICKUP         
        *******B063 FIELD REFERENCED WAS - IN-DELV-STATE           
        *******B063 FIELD REFERENCED WAS - IN-DELV-CITY           
        *******B063 FIELD REFERENCED WAS - IN-PICKUP-STATE         
        *******B063 FIELD REFERENCED WAS - IN-PICKUP-CITY         
        *******B063 FIELD REFERENCED WAS - IN-BOL                 
        *******B063 FIELD REFERENCED WAS - IN-DEST                 
        *******B063 FIELD REFERENCED WAS - IN-ORIG                 
        *******B063 FIELD REFERENCED WAS - IN-REF                 
0OPTIONS FOR THIS RUN - ABEXIT SNAP  DEBUG (STATE FLDCHK NOXREF)  L
 SORT (DEVICE SYSDA  ALTSEQ NO  MSG DEFAULT  MEMORY MAX   WORK   3)
        *******A014 PREMATURE TERMINATION DUE TO PREVIOUS ERROR(S)


Pls elt me know the possibilities which might be leading towards this error.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Thu Jan 21, 2010 4:26 pm
Reply with quote

JOB INPUT P18DCTS has no link with the next job.
The next job starts processing, while you are referencing fields from
the first job, they are not known anymore in the next job.

You should use a construct like :

JOB INPUT(TRANSA1 KEY(TRANAV, PSBAV) TRANSFC KEY(TRANFC, PSBFC))

Read the EZT manual for Merge/Match information
Back to top
View user's profile Send private message
t5590ag

Active User


Joined: 21 May 2009
Posts: 139
Location: United States

PostPosted: Thu Jan 21, 2010 4:42 pm
Reply with quote

Thanks for response Peter. I was looking for EZT manual, couldnt see it out here. By then can you pls relate the suggested construct to my code. Am not able to understand the significance terms you have used.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Thu Jan 21, 2010 4:49 pm
Reply with quote

I will supply a snippet of my own coding. Im not going to explain it.
You really will have to find an EZT manual for that.

Code:

FILE TRANSA1                                                            00360007
TRANID      1      1 A                                                  00370007
TRANAV      1      8 A                                                  00380007
CLASSAV    11      3 A                                                  00390007
PSBAV      16      8 A                                                  00400007
*                                                                       00410007
FILE TRANSFC                                                            00420007
TRANID      1      1 A                                                  00430007
TRANFC      1      8 A                                                  00440007
CLASSFC    11      3 A                                                  00450007
PSBFC      16      8 A                                                  00460007
*       
FILE TRANS                                                              00480007
TRANREC     1     30 A                                                  00490007
TRANUT      1      8 A                                                  00500007
PSBUT       9      8 A                                                  00510007
CLASS1     17      3 A                                                  00520007
SYS1       20      4 A                                                  00530007
CLASS2     24      3 A                                                  00540007
SYS2       27      4 A                                                  00550007
*                                                                       00560007
JOB INPUT(TRANSA1 KEY(TRANAV, PSBAV) TRANSFC KEY(TRANFC, PSBFC))        00940007
IF MATCHED                                                              00950007
   TRANUT = TRANAV                                                      00960007
   PSBUT = PSBAV                                                        00970007
   CLASS1 = CLASSAV                                                     00980007
   SYS1 = 'A1#1'                                                        00990007
   CLASS2 = CLASSFC                                                     01000007
   SYS2 = 'FC00'                                                        01010007
   PUT TRANS                                                            01020007
   GOTO JOB                                                             01030007
END-IF                                                                  01040007
IF NOT TRANSA1                                                          01050007
   TRANUT = TRANFC                                                      01060007
   PSBUT = PSBFC                                                        01070007
   CLASS1 = ' '                                                         01080007
   SYS1 = ' '                                                           01090007
   CLASS2 = CLASSFC                                                     01100007
   SYS2 = 'FC00'                                                        01110007
   PUT TRANS                                                            01120007
   GOTO JOB                                                             01130007
END-IF                                                                  01140007
IF NOT TRANSFC                                                          01150007
   TRANUT = TRANAV                                                      01160007
   PSBUT = PSBAV                                                        01170007
   CLASS1 = CLASSAV                                                     01180007
   SYS1 = 'A1#1'                                                        01190007
   CLASS2 = ' '                                                         01200007
   SYS2 = ' '                                                           01210007
   PUT TRANS                                                            01220007
   GOTO JOB                                                             01230007
END-IF                                                                  01240007
*                                                                       01250007

Back to top
View user's profile Send private message
t5590ag

Active User


Joined: 21 May 2009
Posts: 139
Location: United States

PostPosted: Thu Jan 21, 2010 5:01 pm
Reply with quote

hey Peter !

That was enuf icon_smile.gif It worked, thanks a lot.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Thu Jan 21, 2010 5:06 pm
Reply with quote

Great and you are welcome.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Jan 21, 2010 8:52 pm
Reply with quote

Hello,

Quote:
I was looking for EZT manual, couldnt see it out here.
If your organization is licensed to use the product, all of the material may be downloaded free from CA Support.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CA Products

 


Similar Topics
Topic Forum Replies
No new posts How to save SYSLOG as text data via P... All Other Mainframe Topics 4
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Store the data for fixed length COBOL Programming 1
Search our Forums:

Back to Top