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
 

 

Help required on FILEAID BATCH DD Statement

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Compuware & Other Tools
View previous topic :: :: View next topic  
Author Message
Mai

New User


Joined: 12 Dec 2007
Posts: 4
Location: California

PostPosted: Wed Dec 12, 2007 8:33 pm    Post subject: Help required on FILEAID BATCH DD Statement
Reply with quote

Hi,

There is an input date file. there are a few output files.
DD01 = Datecard.file { 20 LRECL}
DD02 = Output {80 LRECL}
DD03 = Output {80 LRECL}
DD04 = Output {80 LRECL} .....

I would like to copy the 5 chars from pos. 12 from DD01 to 45th pos. in DD02, DD03 etc... output files. What are the statements to use in JCL.

Your immediate response is greatly appreciated!!

Thank you
Back to top
View user's profile Send private message

murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Fri Dec 14, 2007 12:31 pm    Post subject:
Reply with quote

Mai,

Quote:
I would like to copy the 5 chars from pos. 12 from DD01 to 45th pos. in DD02, DD03 etc... output files. What are the statements to use in JCL.

Its confusing. Could you explain clearly.

Also, show some examples of your req.
Back to top
View user's profile Send private message
Mai

New User


Joined: 12 Dec 2007
Posts: 4
Location: California

PostPosted: Fri Dec 14, 2007 8:24 pm    Post subject:
Reply with quote

Oops!! Unfortunately, over explanation turned out to be confusing.

There is one I/P File.
Layout
DATE 20071023 DATADATADAT

O/P File 1: xxxxxxxxx20070101 xxxxxxxxxxxxxxxx
O/P File 2: yyyyyyyyy20070201 yyyyyyyyyyyyyyyy
etc...

I would want to replace only the O/P file date value with the I/P file. There are multiple o/p files with different dates.

The result should be

O/P File 1: xxxxxxxxx20071023 xxxxxxxxxxxxxxxx
O/P File 2: yyyyyyyyy20071023 yyyyyyyyyyyyyyyy

How to achieve this thru FILEAID Batch control card.
Thank you
Back to top
View user's profile Send private message
cpuhawg

Active User


Joined: 14 Jun 2006
Posts: 331
Location: Jacksonville, FL

PostPosted: Sat Dec 15, 2007 3:07 am    Post subject: Reply to: Help required on FILEAID BATCH DD Statement
Reply with quote

You could probably accomplish this using two FILEAID steps. The 1st step reads the DATE record and creates the $$DD02 through $$DD04 control cards to UPDATE the other files in position 45.

Code:

//FILEAID1 EXEC PGM=FILEAID                                 
//SYSPRINT DD  SYSOUT=*                                     
//DD01     DD *                                             
      DATE 20071023                                         
//DD01O    DD DSN=HLQ.FILEAID.CONTROL.CARD,                 
//            DISP=(NEW,CATLG),                             
//            UNIT=(SYSDA),SPACE=(TRK,(1,1),RLSE),         
//            DCB=(RECFM=FB,LRECL=80,BLKSIZE=27920)         
//SYSIN    DD  *                                           
$$DD01 USER PADCHAR=C' ',                                   
       IF=(12,NE,C" "),                                     
       MOVE=(1,C"$$DD02 UPDATE REPL=(45,C'"),MOVE=(26,8,12),
       MOVE=(34,C"')"),WRITE=DD01O,                         
       MOVE=(1,C"$$DD03 UPDATE REPL=(45,C'"),MOVE=(26,8,12),
       MOVE=(34,C"')"),WRITE=DD01O,                         
       MOVE=(1,C"$$DD04 UPDATE REPL=(45,C'"),MOVE=(26,8,12),
       MOVE=(34,C"')"),WRITE=DD01O                         
/*                                                         


The HLQ.FILEAID.CONTROL.CARD dataset should now contain:
Code:

$$DD02 UPDATE REPL=(45,C'20071023')   
$$DD03 UPDATE REPL=(45,C'20071023')   
$$DD04 UPDATE REPL=(45,C'20071023')   


The HLQ.FILEAID.CONTROL.CARD dataset should now be brought into the 2nd FILEAID step as SYSIN.

The HLQ.TEST1, HLQ.TEST2, and HLQ.TEST3 files are input as DD02, DD02, and DD04, respectfully.

HLQ.TEST1 contains:
Code:

 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx


HLQ.TEST2 contains:
Code:

yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy


HLQ.TEST3 contains:
Code:

zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz   
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz   
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz   


The 2nd FILEAID step should execute with:
Code:

//FILEAID2 EXEC PGM=FILEAID                           
//SYSPRINT DD  SYSOUT=*                               
//DD02     DD DISP=SHR,DSN=HLQ.TEST1                   
//DD03     DD DISP=SHR,DSN=HLQ.TEST2                   
//DD04     DD DISP=SHR,DSN=HLQ.TEST3                   
//SYSIN    DD DISP=SHR,DSN=HLQ.FILEAID.CONTROL.CARD   


After it executes, the output looks like the following:

HLQ.TEST1:
Code:

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx20071023xxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx20071023xxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx20071023xxxxx


HLQ.TEST2:
Code:

yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy20071023yyyyy 
yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy20071023yyyyy 
yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy20071023yyyyy 


HLQ.TEST3:
Code:

zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz20071023zzzzz 
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz20071023zzzzz 
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz20071023zzzzz 


If this is not your exact requirement, you can probably adjust the JCL and control cards as needed.
Back to top
View user's profile Send private message
Mai

New User


Joined: 12 Dec 2007
Posts: 4
Location: California

PostPosted: Sun Dec 16, 2007 8:10 am    Post subject: RE: Thank you for solving my query on FILEAID BATCH
Reply with quote

Hi cpuhawg,

Thank you very much for your response. This is truly the solution. I would n't be trying this till next work day but great tweaking on Control card. My query can be considered resolved. I appreciate your time & Effort. Thank you Mai
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 -> Compuware & Other Tools All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Batch job tuning sgandhla Testing & Performance analysis 0 Fri Mar 24, 2017 9:41 pm
No new posts MIPS/CPU consumption reduction in Batch vishwakotin DFSORT/ICETOOL 4 Sat Mar 18, 2017 5:46 pm
No new posts ROUNDED Problem with COMPUTE statement shalem COBOL Programming 11 Thu Feb 09, 2017 8:16 pm
No new posts VALIDATE NULL VALUE IN DB2 CASE STATE... useit DB2 5 Thu Feb 09, 2017 4:34 pm
No new posts How does a called pgm know if its cal... Graeme Westerman COBOL Programming 4 Tue Nov 29, 2016 9:25 pm


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