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
 

 

JCL SORT CARD

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
View previous topic :: :: View next topic  
Author Message
janmejay
Warnings : 1

New User


Joined: 22 Jun 2007
Posts: 81
Location: bangalore

PostPosted: Fri Sep 27, 2013 7:40 pm    Post subject: JCL SORT CARD
Reply with quote

Hello

I need to create a sort card where in my input files are having data like below.

sftp> ls -1
file1.zip
file2.zip
sftp> QUIT


I want the output file to contain as many as GET command as the number of zip files are present input file. Provided output file should look like as below-

Get file1.zip /path1
Get file2.zip /path2

Now if the input file contain 3 files the number of GET command sould be 3.
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7228

PostPosted: Fri Sep 27, 2013 8:10 pm    Post subject: Reply to: JCL SORT CARD
Reply with quote

Use INCLUDE with SS to do a substring search for .zip.

The you can use a literal for the Get, and whatever magic you need for the /path.

I doubt that ftp will mind about any trailing blanks, but if you want it to look neater you can give it a bit of a SQZ afterwards.
Back to top
View user's profile Send private message
janmejay
Warnings : 1

New User


Joined: 22 Jun 2007
Posts: 81
Location: bangalore

PostPosted: Fri Sep 27, 2013 8:19 pm    Post subject:
Reply with quote

For the path actually i would like to see them as below over unix mainframe.

Get file1.zip /path/file1.zip
Get file2.zip /path/file2.zip
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Sep 27, 2013 9:09 pm    Post subject:
Reply with quote

Hello,

If the output path is constant, just insert it as a literal when writing your output.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7228

PostPosted: Fri Sep 27, 2013 9:36 pm    Post subject: Reply to: JCL SORT CARD
Reply with quote

You'll need to know the maximum lengths of the fielname and pathname. You will then have to SQZ to make a valid filename including the path.
Back to top
View user's profile Send private message
janmejay
Warnings : 1

New User


Joined: 22 Jun 2007
Posts: 81
Location: bangalore

PostPosted: Fri Sep 27, 2013 9:41 pm    Post subject:
Reply with quote

Thanks Dick, thanks Bill .

Let me check, I will get back agaun.
Back to top
View user's profile Send private message
janmejay
Warnings : 1

New User


Joined: 22 Jun 2007
Posts: 81
Location: bangalore

PostPosted: Mon Sep 30, 2013 7:34 pm    Post subject:
Reply with quote

Hey Dick , hey Bill,

SQZ worked well for me. thanks
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 -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm
No new posts How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm


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