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

JCL sort card for file creation conditionally


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Digvijay Singh

Active User


Joined: 20 Apr 2022
Posts: 141
Location: India

PostPosted: Thu May 05, 2022 11:42 am
Reply with quote

Hi all ,

I have a file which conatains the return code of the job, I mean i have captured the return code of some job and now my requirement is basis on the return code available in the file i want to create one PS file something like below:

IF RC=00 in file i want create one ps success file with RC==0 and if RC Not equal to 00 i want to create one error file with RC copied into it.

sample file:


Code:
[code]
 sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
 VIEW       QSYS.SORT.RC.CODE                               Columns 00001
 Command ===>                                                  Scroll ===>
 ****** ***************************** Top of Data ************************
 000001 RC=0012                                                           
 000002                                                                  [/code]
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1255
Location: Bamberg, Germany

PostPosted: Thu May 05, 2022 11:54 am
Reply with quote

What have you tried yourself to achieve this?

Learn to specify correctly what you want. You wrote RC=00 while your sample shows RC=nnnn and so on. What happens if you get an ABEND code?

PS: z/OS knows mainly Datasets, not Files.
Back to top
View user's profile Send private message
Digvijay Singh

Active User


Joined: 20 Apr 2022
Posts: 141
Location: India

PostPosted: Thu May 05, 2022 12:22 pm
Reply with quote

okay Thanks for reply.

Let me phrase this again:

INPUT DATA CONATAINS RETURN CODE IN FORAMATE RC=NNNN

It could be either RC=0000 or other than 0000. basis on RC in input data set I have to create one success file or failure file. IF RC=0000 create ABC.DIGGI.SUCSESS.FILE BUT IF RC NE 0000 create one FAILIURE FILE SAY ABC.DIGGI.FAIL.FILE.

hope i am clear now.

I am thinking how i can achieve it, yes i haven't tried anything yet still just figuring out what sort i can use. if you have any suggestion or even small hint will take it form there.
Back to top
View user's profile Send private message
Digvijay Singh

Active User


Joined: 20 Apr 2022
Posts: 141
Location: India

PostPosted: Thu May 05, 2022 12:35 pm
Reply with quote

i can achieve this using INCLUDE condition .

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

Senior Member


Joined: 29 Apr 2008
Posts: 2023
Location: USA

PostPosted: Thu May 05, 2022 4:44 pm
Reply with quote

You continue stepping the same way which everyone suggested you not to follow in several of your previous topics.

While doing simple things in an extremely complicated manner you just multiply the existing amount of garbage already created in the software world, and also you guarantee that the life of your future followers to become a nightmare.
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
Search our Forums:

Back to Top