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
 

 

Converting multiple VB files to FB files in single step

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Viswanath Reddy

New User


Joined: 08 Aug 2016
Posts: 2
Location: INDIA

PostPosted: Mon Aug 08, 2016 11:49 pm    Post subject: Converting multiple VB files to FB files in single step
Reply with quote

Hi Everyone,

I am trying to convert N no.of files from VB to FB in single step but I am not finding right answer. Is any suggestions on this question

Thanks & Regards,
Viswanath Reddy Y
Back to top
View user's profile Send private message

Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Tue Aug 09, 2016 12:12 am    Post subject:
Reply with quote

I would write a program that does dynamic allocation of input and output data sets, taking in a list of input and output DSNs. Other sempai may offer other solutions; in particular, a *Sort maven as such Mr. Woodger may have a *Sort solution.
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1609
Location: NY,USA

PostPosted: Tue Aug 09, 2016 1:35 am    Post subject:
Reply with quote

JCL does not have any looping / go to structures. Program is the best choice also look INTRDR to trigger multiple jobs for each file.
Back to top
View user's profile Send private message
Viswanath Reddy

New User


Joined: 08 Aug 2016
Posts: 2
Location: INDIA

PostPosted: Tue Aug 09, 2016 8:58 am    Post subject: Reply to: Converting multiple VB files to FB files in single step
Reply with quote

I tried few codes it doesn't work well but I got to know that if it is in REXX we can do . I don't have any idea about REXX .If anyone find an answer(even if it is in REXX also) please post it here
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1609
Location: NY,USA

PostPosted: Tue Aug 09, 2016 9:48 am    Post subject:
Reply with quote

you already have two solutions given so what is that you don't understand? what have you tried ? what doesn't work?
Back to top
View user's profile Send private message
Abid Hasan

New User


Joined: 25 Mar 2013
Posts: 65
Location: India

PostPosted: Tue Aug 09, 2016 10:52 am    Post subject:
Reply with quote

Hello Viswanath,

The query raised is a little vague, also we donot know what all you've already tried that 'did not work'.
A few quick questions that come to mind on reading the post:
a. Are all the 'N' VB datasets having same RECL, or are they different?
b. Will the programmer 'be aware' of the input LRECL or they can vary depending upon every run?
c. How does the programmer choose the output LRECL for any of the input?

Either way, if you choose DFSORT to do this, a quick solution with a bit of coding, can be rigged up as below (this is but one of many ways):
1. Have the list of input VB DS in a PS dataset
2. Use this DS as input and generate a dynamic JCL which uses OUTFIL VTOF function of *SORT; again this can be done by using multiple SORT steps or a single ICETOOL 'COPY FROM(IN) TO(OUT) USING(CTL)' step wherein, data in 'CTL' will remain constant, 'COPY FROM' statements will depend on how many datasets are to be copied.
3. Route the above output to INTRDR.
4. In case LRECL for the VB DS can vary, save the LISTDS info of all the datasets in a PS dataset; trim this data to group DSN and LRECL.
5. Use the aforementioned DFSORT JCL build to build the requisite COPY JCL using the info obtained in point '4'; and route the output to INTRDR.

A similar logic can be used in case of REXX; but there again, YOU will have to devise a solution to handle output LRECL.
Back to top
View user's profile Send private message
sergeyken

New User


Joined: 29 Apr 2008
Posts: 37
Location: Maryland

PostPosted: Fri Aug 12, 2016 3:08 am    Post subject:
Reply with quote

FILEAID can do the job

Code:
//FILECOPY EXEC PGM=FILEAID                       
//SYSPRINT  DD SYSOUT=*                           
//*                           
//* INPUT DATA FILES                             
//DD01      DD DISP=SHR,DSN=&SYSUID..INPUT1       
//DD02      DD DISP=SHR,DSN=&SYSUID..INPUT2       
//DD03      DD DISP=SHR,DSN=&SYSUID..INPUT3       
//* OUTPUT DATA FILES                             
//DD01O     DD DISP=(NEW,PASS),                   
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=0),
//             DSN=&&OUTFILE1                     
//DD02O     DD DISP=(NEW,PASS),                   
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=0),
//             DSN=&&OUTFILE2                     
//DD03O     DD DISP=(NEW,PASS),                   
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=0),
//             DSN=&&OUTFILE3                     
//*                                               
//SYSIN    DD  *                                 
$$DD01  COPY                                     
$$DD02  COPY                                     
$$DD03  COPY                                     
//* 


Confirmation of results: RECFM=VB --> RECFM=FB
Code:

                                                                               
DD01     DSN=$USER.INPUT1 OPENED AS PS,                         
             RECFM=VB,LRECL=300,BLKSIZE=27968,VOL=STGA88                       
DD01O    DSN=SYS16224.T172619.RA000.#123456.R0188163 OPENED AS PS,             
             RECFM=FB,LRECL=80,BLKSIZE=80,VOL=WRKT0M                           
$$DD01  COPY                                                                   
ABOVE FUNCTION ENDED ON NORMAL EOD                                       RC=0 
  RECORDS-READ=15,COPIED=15                                                   
                                                                               
15 RECORDS WRITTEN TO DD01O-SYS16224.T172619.RA000.#1233456.R0188163           
                        VOL=WRKT0M                                             

DD02     DSN=$USER.INPUT2 OPENED AS PS,                         
             RECFM=VB,LRECL=300,BLKSIZE=27968,VOL=STGA88                       
DD02O    DSN=SYS16224.T172619.RA000.#123456.R0188164 OPENED AS PS,             
             RECFM=FB,LRECL=80,BLKSIZE=80,VOL=WRKT0M                           
$$DD02  COPY                                                                   
ABOVE FUNCTION ENDED ON NORMAL EOD                                       RC=0 
  RECORDS-READ=15,COPIED=15                                                   
                                                                               
15 RECORDS WRITTEN TO DD01O-SYS16224.T172619.RA000.#1233456.R0188164           
                        VOL=WRKT0M                                             


DD03     DSN=$USER.INPUT3 OPENED AS PS,                         
             RECFM=VB,LRECL=300,BLKSIZE=27968,VOL=STGA88                       
DD03O    DSN=SYS16224.T172619.RA000.#123456.R0188165 OPENED AS PS,             
             RECFM=FB,LRECL=80,BLKSIZE=80,VOL=WRKT0M                           
$$DD03  COPY                                                                   
ABOVE FUNCTION ENDED ON NORMAL EOD                                       RC=0 
  RECORDS-READ=15,COPIED=15                                                   
                                                                               
15 RECORDS WRITTEN TO DD01O-SYS16224.T172619.RA000.#1233456.R0188165           
                        VOL=WRKT0M                                             

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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts High CPU consumption Job using IAM fi... aswinir JCL & VSAM 8 Thu Dec 01, 2016 8:28 pm
No new posts Two Selects in a single select query Rohit Umarjikar DB2 1 Fri Nov 04, 2016 8:46 pm
No new posts Match or compare two files in VB Format anatol DFSORT/ICETOOL 14 Thu Nov 03, 2016 7:41 pm
This topic is locked: you cannot edit posts or make replies. How to use 2 input files in control c... Gunapala CN DFSORT/ICETOOL 23 Thu Oct 13, 2016 3:42 pm
No new posts Single COPY CICS TS datasets and when... Kyle Carroll CICS 2 Tue Oct 11, 2016 9:47 pm


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