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
 

 

File Aid used in Jcl

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

New User


Joined: 09 Oct 2007
Posts: 1
Location: chennai

PostPosted: Thu Oct 11, 2007 5:27 pm    Post subject: File Aid used in Jcl
Reply with quote

>Input record .:

Vin# Module Configuration data
(starts from position 1st) (start its from 118th position) (starts from 148th position)

1FMEU31K48LA05353 CFG_726_WB_00 123456789012345678901234567890
1FMEU31K48LA05353 CFG_726_WB_01 12324567500000000000
1FMEU31K48LA05353 CFG_726_WB_02 5748749590079997997
1FMEU31K48LA05353 CFG_726_WB_03 65758697054345756886
1FMEU31K48LA05353 CFG_726_WB_04 12672589638907490670
1FMEU31K48LA05353 CFG_726_WB_05 1200 ---------------------------------------------> This data will remain as it is (1200)
1FMEU31K48LA05353 CFG_726_WB_06 01234567890
1FMEU31K48LA05353 CFG_726_WB_07 12768469283679237590
1FMEU31K48LA05353 CFG_726_WB_08 12769123472875089325
1FMEU31K48LA05353 CFG_726_WB_09 1234567890 ------------------------------------> this data should change to "8001000000"
1FMEU31K48LA05353 CFG_726_WB_0A 123456789012222222

00,01,02,03,04,05,06,07,08,09,0A===> block number. Each block can hold up to max of 50 bytes(100 characters),




2 >Requirement:

a> 10 th position of the Vin# = 7 0r 8
11th position of the Vin# = L
and 1FMEU31K48LA05353 CFG_726_WB_05 1200
;
:
then 1FMEU31K48LA05353 CFG_726_WB_09 8001000000



3>Failaid that I wrote for the above requirement:

//CSSTEP1A EXEC PGM=FILEAID
//SYSPRINT DD SYSOUT=*
//SYSLIST DD SYSOUT=*
//SYSTOTAL DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//DD01 DD DSN=IFS1965.TEST.BCE.INPUT.DATA,
// DISP=SHR
//DD01O DD DSN=IFS1965.BCE.OUT1,
// DISP=(,CATLG,DELETE),
// DCB=(RECFM=FB,LRECL=264,BLKSIZE=27984),
// SPACE=(CYL,(10,10),RLSE)
//SYSIN DD *
$$DD01 COPYALL IF=(10,EQ,C'8'),AND=(11,EQ,C'L'),
AND=(118,EQ,C'CFG_726_WB_05'),AND=(148,EQ,C'1200'),
AND=(10,EQ,C'8'),AND=(11,EQ,C'L'),
AND=(118,EQ,C'CFG_726_WB_09'),REPL=(148,C'8001000000 '),
/*


When I execuite this fileaid Data not yet changed as per the requirement.
Please correct the FileAid if it wrong and please tell any other ways to satisfy the above condition apart from fileaid.
Back to top
View user's profile Send private message

murmohk1

Senior Member


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

PostPosted: Thu Oct 11, 2007 5:55 pm    Post subject:
Reply with quote

Sunil,

Link for your previous post on the same issue. -

http://ibmmainframes.com/viewtopic.php?t=25110
Back to top
View user's profile Send private message
murmohk1

Senior Member


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

PostPosted: Thu Oct 11, 2007 6:07 pm    Post subject:
Reply with quote

Sunil,

Quote:
AND=(118,EQ,C'CFG_726_WB_05'),

Quote:
AND=(118,EQ,C'CFG_726_WB_09'),

I have not used FA in batch mode much.

Check the possibility of TWO values occuring at 118 position in the SAME record.

Revisit your control card and put the conditions properly.
Back to top
View user's profile Send private message
cpuhawg

Active User


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

PostPosted: Thu Oct 11, 2007 6:13 pm    Post subject: Reply to: File Aid used in Jcl
Reply with quote

You are on the right track:

Code:

$$DD01 COPYALL IF=(10,EQ,C'8'),AND=(11,EQ,C'L'),
AND=(118,EQ,C'CFG_726_WB_05'),AND=(148,EQ,C'1200'),
AND=(10,EQ,C'8'),AND=(11,EQ,C'L'),
AND=(118,EQ,C'CFG_726_WB_09'),REPL=(148,C'8001000000 '),


If effect, the code above states that 'CFG_726_WB_05' and 'CFG_726_WB_09' must be in the same position because you connected all the logic with ANDs.

Your code should look like:

Code:

$$DD01 COPYALL IF=(10,EQ,C'7,8'),AND=(11,EQ,C'L'),
 AND=(118,EQ,C'CFG_726_WB_05'),AND=(148,EQ,C'1200'),
 REPL=(148,C'1200'),
 IF=(10,EQ,C'7,8'),AND=(11,EQ,C'L'),
 AND=(118,EQ,C'CFG_726_WB_09'),REPL=(148,C'8001000000 ')


This codes state if position 10 is EQ to '7' or '8' and position 11 is EQ to 'L' and position 118 is EQ to 'CFG_726_WB_05' and position 148 is EQ to '1200', then replace 148 with '1200'. It then checks to see if position 10 is EQ to '7' or '8' and position 11 is EQ to 'L' and position 118 is EQ to 'CFG_726_WB_09', then replace position 148 with '8001000000 '. All records all copied from the input to the output file because you are using COPYALL.

If the '1200' isn't going to change, there is no need to have the logic for that. You could use:

Code:

$$DD01 COPYALL IF=(10,EQ,C'7,8'),AND=(11,EQ,C'L'),
 AND=(118,EQ,C'CFG_726_WB_09'),REPL=(148,C'8001000000 ')
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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am
No new posts Occurrence of various strings within ... TS70363 JCL & VSAM 1 Thu Apr 27, 2017 8:18 pm


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