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

New User


Joined: 20 Apr 2022
Posts: 60
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

Active Member


Joined: 15 Aug 2015
Posts: 775
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

New User


Joined: 20 Apr 2022
Posts: 60
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

New User


Joined: 20 Apr 2022
Posts: 60
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: 1492

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 PS file parameter JCL & VSAM 4
No new posts FD Section to Create FB or Vb File Dy... COBOL Programming 1
No new posts Count Records with a crietaria in a f... DFSORT/ICETOOL 5
No new posts question on Outrec and sort #Digvijay DFSORT/ICETOOL 20
No new posts Creating a VB file PL/I & Assembler 10
Search our Forums:

Back to Top