Endevor

  • 1.  Filemaster - sequental file to a pDS

    Posted Mar 29, 2016 10:34 AM

    I was given a sequential file that was copied via filemaster into a sequential file, then downloaded into a text file.

    I brought the text file  back to the mainframe,  however since I did not know what the original record size was

    I chose 133.  Is there a way using filemaster batch to copy this sequential file to create a new PDS???

    A sample of the data is as follows;

    1CA File Master Plus r8.5

        2012-03-02 06:1.. Input SYSIN parameters to batch process are displayed below

    copi. *** CAWA2107I  DDNAME SYSUT1   Member BATCHPDF records read:    102

     

    This is how I can tell Filemaster was used to create the sequential file.

    Any information would be greatly appreciated

     

    D. Lusk



  • 2.  Re: Filemaster - sequental file to a pDS
    Best Answer

    Broadcom Employee
    Posted Mar 29, 2016 12:07 PM

    Hello,

     

    Below is an example of a File Master for MVS COPY command that copies a sequential file to a member in a new PDS, keeping the record length of the original dataset all along. In the below job the first step is there just to mimic your first step that copied sequential to sequential. Note I use the LIKE jcl parameter to ensure the record length is preserved. Note also in step 2 the use of the OUTPUT(library(member)) syntax, which is the only syntax that can be used in the case the PDS is created in the same step.

     

     

    //UserC JOB 124300000,'FMMVS',CLASS=A                          

    //* --------------------------------------------------------                                                                    

    //S1     EXEC PGM=CAWABATC                                        

    //SYSPRINT    DD  SYSOUT=*                                        

    //SYSLIST       DD  SYSOUT=*                                        

    //SYSIN           DD  *                                               

      COPY INFILE(SYSUT1),OUTFILE(SYSUT2)                             

    /*                                                                

    //SYSUT2      DD  DSN=user.TEMP,DISP=(NEW,PASS,DELETE),        

    //            LIKE=user.SEQ1,                           

    //            SPACE=(TRK,(5,5)),UNIT=SYSDA                        

    //SYSUT1      DD  DSN=user.SEQ1,DISP=SHR                

    /*                                                                

    //S2     EXEC PGM=CAWABATC                                        

    //SYSPRINT    DD  SYSOUT=*                                        

    //SYSLIST     DD  SYSOUT=*                                        

    //SYSUT2      DD  DSN=user.PDS,DISP=(NEW,CATLG,DELETE),        

    //            LIKE=user.TEMP,SPACE=(TRK,(5,5,5)),UNIT=SYSDA    

    //SYSUT1      DD  DSN=user.TEMP,DISP=(OLD,DELETE,DELETE)       

    //SYSIN       DD *                                                

      COPY INFILE(SYSUT1),OUTFILE(user.PDS(MEMBER))                

    /*     

     

     

    If you wanted to copy to a member in an existing PDS you could use this syntax

    SYSUT2   DD DSN=user.PDS(MEMBER),DISP=SHR

    and

    COPY INFILE(SYSUT1),OUTFILE(SYSUT2)

     

    In order to control the replacement of an existing member you would use the REPLACEMEM(Y|N) parameter:

     

    COPY INFILE(SYST1),OUTFILE(SYSUT2),REPLACEMEM(Y)

     

    Best regards,

    Patrice Cotte

    CA Technologies



  • 3.  Re: Filemaster - sequental file to a pDS

    Posted Mar 30, 2016 08:24 AM

    NTAC:3NS-20

    Thank you ,,,

       From  looking at the file,  it looks like  the PDS was copied with the my.pds(*).

    So copying into 1 member,  I would have to separate the different members and manually create them?

     

    This is one of the lines of data

     

     

    Can I specify each individual member or  is there a parm to re-create the members automatically

     

     

     

    Derez D. Lusk

    Mainframe Applications Architect

    Worldwide Information & Technology

    Accounting Applications (GDS)

    801 S Canal St., C-3N Chicago IL 60607-4715 | office: (312) 557-4017

    mobile: (708)-805-0106 | fax: (312) 557-6270 | email: dl158@ntrs.com<mailto:dl158@ntrs.com>



  • 4.  Re: Filemaster - sequental file to a pDS

    Broadcom Employee
    Posted Mar 30, 2016 11:42 AM

    Hello Derez,

     

    The preferred method would be to use the ADDCNTL(Y) keyword on generating the sequential file. The library can be recreated running the IEBUPDTE utility. Note when you use the COPY command in the FM batch utility to copy PDS members to a sequential file ADDCNTL(Y) is automatically set for you.

     

    If for any reason the sequential file was created with no separator here's a way to recreate your library using the FM batch program. It requires some additional work from you though. In the below example:

    - Step1 concatenates PDS members into a sequential file with ADDCNTL(N) in order to skip the insert of the separator.

    - Step2 creates a deck of copy commands form a list of members with their line count. In real life you would probably use a Rexx to scan the original PDS and create the list. Note the line counts that are later used in the OUTLIM parameter must be padded with 0s. Note also the INFILE parameter is gnerated with NOCLOSE so that to keep the position in the input prior to start copying to the next member.

    - Step 3 prints the generated commands for clarity

    - Step 4 let the FM batch program process the deck of commands.

     

    Below is the job

     

    Best regards,

    Patrice

     

    //userC JOB .....

    //* ----------------------------------------------------------------   

    //* THE BELOW CAN HELP WHEN A SEQUENTIAL FILE WAS CREATED BY         

    //* CONCATENATING PDS MEMBERS INTO IT WITH NO SEPARATOR IN-BETWEEN.                

    //* 1. PREPARE A LIST OF MEMBERS WITH THE NUMBER OF LINES

    //* 2. CREATE A DECK OF FM COPY COMMANDS                               

    //* 2. EXECUTE THE DECK OF COMMANDS                                    

    //* ----------------------------------------------------------------   

    //S1     EXEC PGM=CAWABATC                                             

    //SYSPRINT    DD  SYSOUT=*                                             

    //SYSLIST     DD  SYSOUT=*                                             

    //SYSUT2      DD  DSN=user.TEMP.PS,DISP=(NEW,PASS,DELETE),          

    //            LIKE=user.PDS1,DCB=DSORG=PS,                   

    //            SPACE=(CYL,(1,1)),UNIT=SYSDA                             

    //SYSUT1      DD  DSN=user.PDS1,DISP=SHR                     

    //SYSIN       DD  *                                                    

      COPY INFILE(SYSUT1),OUTFILE(SYSUT2),MEMBER(*),ADDCNTL(N)             

    /*                                                                     

    //S2     EXEC PGM=CAWABATC                                             

    //SYSPRINT    DD  SYSOUT=*                                             

    //SYSLIST     DD  SYSOUT=*                                             

    //SYSUT1   DD    *                                     

    *---+----1----+----2----+----3----+----4----+----5     

    INALL1   00005                                         

    INALL2   00010                                         

    INFIRST1 00004                                         

    INFIRST2 00007                                         

    /*                                                     

    //SYSUT2   DD    DSN=&&CMD,UNIT=VIO,SPACE=(TRK,(1,1)), 

    //         LRECL=80,DISP=(NEW,PASS)                    

    //SYSIN    DD    *                                     

      READ,                                                

        INFILE(SYSUT1),                                    

        PADCHAR(X"40"),                                    

        IF(1,1,NE,C"*"),                                   

           MOVE(CLEAR),                                    

           MOVE(1,C"   COPY INFILE(SYSUT1,NOCLOSE),"),     

           WRITE(SYSUT2),                                  

           MOVE(CLEAR),                                    

           MOVE(1,C"     OUTFILE(user.TEMP.PDS("),      

           MOVE(+0,8,1),                                   

           MOVE(39,C")),"),                                

           WRITE(SYSUT2),                                  

           MOVE(CLEAR),                                    

           MOVE(1,C"     OUTLIM("),                        

           MOVE(+0,5,10),                                  

           MOVE(18,C")"),                                  

           WRITE(SYSUT2)                                   

    /*                                                     

    //S3     EXEC PGM=IEBGENER                             

    //SYSPRINT    DD  SYSOUT=*                             

    //SYSUT2      DD  SYSOUT=*                             

    //SYSUT1      DD  DSN=&&CMD,DISP=(OLD,PASS)            

    //SYSIN       DD  DUMMY                                

    //*                                                    

    //S4     EXEC PGM=CAWABATC                             

    //SYSPRINT    DD  SYSOUT=*                             

    //SYSLIST     DD  SYSOUT=*                                           

    //SYSUT2      DD  DSN=user.TEMP.PDS,DISP=(NEW,CATLG,DELETE),      

    //            LIKE=user.TEMP.PS,SPACE=(CYL,(1,1,45)),UNIT=SYSDA   

    //SYSUT1      DD  DSN=user.TEMP.PS,DISP=(OLD,DELETE,DELETE)       

    //SYSIN       DD    DSN=&&CMD,DISP=(OLD,PASS)